• Resolved rezaei12

    (@rezaei12)


    http://arashmazinani.com is my site

    I’ve followed the instructions and put in the following code in my sidebar.php

    <?php wpp_get_mostpopular(); ?>
    		    <?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=weekly&limit=5&order_by=views&stats_comments=0&pages=0"); ?>

    As you can see I have put the stats_comments attribute to ‘0’ so it should not show how many comments each post has in the most popular list.

    On my site the top two posts have comments displayed next to them but the three below it are not showing comments next to them.

    Why is it displaying some posts with comments next to them and some without when i’ve set the code to make sure it doesn’t display the number of comments each post has?

    Thanks in advance

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Rezaei12,

    Just checked your site and it seems to be working fine. Also, in the code you posted you’re calling the wpp_get_mostpopular function twice:

    <?php wpp_get_mostpopular(); ?>
    <?php if (function_exists(‘wpp_get_mostpopular’)) wpp_get_mostpopular(“range=weekly&limit=5&order_by=views&stats_comments=0&pages=0”); ?>

    The first one isn’t receiving any arguments, so it’ll use the default settings (stats_comments=1) and show the comment count for each post.

    The second call does include arguments so it’ll ignore comments count and won’t display it, just as you need it to.

    Delete the first call and keep the second one on your theme, like this:

    <?php if (function_exists(‘wpp_get_mostpopular’)) wpp_get_mostpopular(“range=weekly&limit=5&order_by=views&stats_comments=0&pages=0”); ?>

    Thread Starter rezaei12

    (@rezaei12)

    That worked great!
    Thanks!

    No problem, glad to know that everything’s fine now 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Popular Posts] stats_comments set to 0 still showing comments on blog’ is closed to new replies.