How to get a variable comment field of all comments of current post?
I want to display all (for current post) comment user website url in to current post.
Thanks for help.
How to get a variable comment field of all comments of current post?
I want to display all (for current post) comment user website url in to current post.
Thanks for help.
You must be logged in to post a comment.
get_comments()
and the current postâs ID.wp_list_pluck()
.array_filter()
without a callback..
$comment_urls
is now an array of URLS. Donât forget to useesc_url()
when you print those into your page.You could also filter
'comments_clauses'
to query for comments with a non-empty URL field only. That might be faster.