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

  1. RummiOnTour
    Posted 4 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.


  2. Hector Cabrera
    Plugin Author

    Posted 4 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

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic