Get a variable field of all comments of current post
To get the comments use get_comments() and the current post’s ID. To get the URL fields only use wp_list_pluck(). To remove the empty fields use array_filter() without a callback. . $comment_urls = array (); $all_comments = get_comments( array ( ‘post_id’ => get_the_ID() ) ); if ( $all_comments ) { $comment_urls = array_filter( wp_list_pluck( $all_comments, ‘comment_author_url’ … Read more