[Plugin: List category posts] How to Add comment count to plugin
-
Thank you for your help in advance — I would try to figure this out myself but it could take a day, or a week.. So I figure why not let the experts help.
I use a plugin – wp-catlist that shows all posts in a category…. and it produces the output on “https://www.samdiener.com/article-list/”
I would like to add the comment count to the plugin. So it produces:
Title Yadi Yadi Yada, (X comments)
The code in the plugin that produces the post title output is/are:
foreach($catposts as $single): $output .= '<li><a href="' . get_permalink($single->ID).'">' . $single->post_title . '</a>'; if($atts['date']=='yes'){ $output .= ' - ' . get_the_time($atts['dateformat'], $single);//by Verex, great idea! } if($atts['author']=='yes'){ $lcp_userdata =
I am assuming that it is get_comment_count($single) or something, but I don’t know enough wp/php to add it to the code without killing it completely. Whoa is me.
Thank you? and thoughts?
Sam Diener
https://www.ads-software.com/extend/plugins/list-category-posts/
- The topic ‘[Plugin: List category posts] How to Add comment count to plugin’ is closed to new replies.