How to change title attribute returned by comments_popup_link()?

I can change label of comments by altering Comment(s) from parameter of following function: comments_popup_link(‘No Comments;’, ‘1 Comment;’, ‘% Comments;’); But, seems that title attribute is returned from core modules. Suggest me to alter title attribute without editing core modules. 2 Answers 2 If you look into the function comments_popup_link() you will see the following … Read more

How would I count the number of times a comment meta field’s value is in a post’s entire comments?

How would I count (and display) the number of times a comment meta field’s value is a post’s entire comments? e.g. meta key is “fish” and key value “shark” appears in 5 comments of a post. 1 Answer 1 You should be able to do a meta_query in a WP_Comment_Query(): $args = array( ‘post_id’ => … Read more

Query & Sort Comments by custom comment meta

I added a basic “favorite/recommend” functionality for posts and comments to a wordpress site I’m working on. I’m storing the total numbers of comment “likes” in a custom comment meta field (update_comment_meta). Now I would like to query and sort comments based on this custom meta key and the corresponding values in order to display … Read more

change the comment time output to: X time ago instead of actual date and time

<?php printf(__(‘%1$s at %2$s’), get_comment_date(), get_comment_time()) ?> Above is the default code that exists for comments.php in the WP Core. This will produce an Output like this: October 1, 2017 at 6:58 am But I want something like this → Posted: 11 Months ago or Posted 3 days Back or Posted 23 hours back Is … Read more