Tag:Get article reviews

  • WordPress Gets Comments on Articles and Filters Author Code Sharing

    Time:2019-7-15

    Copy code The code is as follows: // Get the number of reviews, excluding the author himselffunction get_comments_number_filter_author() { global $wpdb, $post;// The name of the author needs to be filteredAuthor = author’s name; $comments = $wpdb->get_results(“SELECT count(0) as total FROM $wpdb->comments WHERE comment_post_ID = $post->ID AND comment_type = ” AND comment_approved = ‘1’ AND […]