Author Page – All Comments by an Author

Home/Techies, Wordpress tricks/Author Page – All Comments by an Author

Author Page – All Comments by an Author


You can create a complete and nice Author’s page which will be displayed whenever someone clicks on an Author’s name link. The trick here is to create an author.php, this page will be displayed whenever you click on an author’s name link.
The Author page for an author can have all posts and comments by an author. To list all comments by an author you can use the code below.

comments, $wpdb->posts
    WHERE user_id = $curauth->ID
    AND comment_post_id = ID
    AND comment_approved = 1
    ORDER BY comment_ID DESC
 ";

 $comments_array = $wpdb->get_results($querystr, OBJECT);

if ($comments_array): ?>




Yumna Tatheer

Yamna Tatheer is a WordPress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

More Posts

Follow Me:
Facebook

About the Author:

Yamna Tatheer is a Wordpress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

Leave A Comment