WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Remove stats from template function (5 posts)

  1. geoff67
    Member
    Posted 2 years ago #

    I'm having difficulty removing the stats when using the function in a template (not shortcode, not widget).

    Everything looks correct to me:

    <?php
    $popular = array(
    	'limit'=>'4',
    	'range'=>'day',
    	'order_by'=>'views',
    	'pages'=>false,
    //	'stats_tag'=>array('comment_count'=>false),
    	'stats_comments' => false,
    //	'do_pattern'=>true
    );
    if(function_exists('wpp_get_mostpopular')):
    ?>
    	<aside id="trending-now">
    		<p class="loop-category">Trending Now</p>
    		<?php wpp_get_mostpopular($popular); print_r($popular); ?>
    	</aside>
    <?php endif; ?>

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

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi geoff,

    Are you using the development version or the last stable (2.2.1)?

  3. geoff67
    Member
    Posted 2 years ago #

    Stable 2.2.1

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    The 2.2.1 version (and earlier) only takes a string as parameter. Try this:

    wpp_get_mostpopular('limit=4&range=daily&order_by=views&pages=0&stats_comments=0');

    That should work.

  5. geoff67
    Member
    Posted 2 years ago #

    Ahh. Thanks for the quick replies.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic