WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Remove Pages from Popular Posts Listing (3 posts)

  1. Xcellence IT
    Member
    Posted 1 year ago #

    I'm using this plugin to display popular post count on my site.. I have excluded pages from the listing as per instructions provided here:

    http://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-pages?replies=4

    So now my code is this:

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

    But the pages are still listed on the site. Can you pls advise what could be wrong?

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

  2. H├ęctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    That solution does not work with the most recent versions of the plugin. To exclude pages, simply use the post_type parameter:

    <?php
    if (function_exists('wpp_get_mostpopular')) {
      wpp_get_mostpopular("range=monthly&order_by=views&stats_comments=0&limit=10&post_type=post");
    }
    ?>
  3. Xcellence IT
    Member
    Posted 1 year ago #

    Hi,

    Thank you for your instant response. This fixed my issue.

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic