WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] All-Time Stats gone solution (2 posts)

  1. RummiOnTour
    Member
    Posted 2 years ago #

    Hi to all and especially Hector. You did a great job, but the problem with the All-Time stats comes when you add the views, what nearly everone will do. Anyone who dares to change the php file ;-) here are the lines. It is about the $fields section for the sql statement:

    if ( $instance['stats_tag']['views'] || ($sortby != 'comment_count') ) {
    if ( $instance['range'] == 'all') {
       $fields .= "$table.pageviews AS 'pageviews' ";
    				} else {

    you have to activate this, otherwise the statement would sum the posts in the cache database, which is not joined.
    And do not forget to add a second } at the end the if section.

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

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Rummi,

    Thanks for the tip, will check this now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic