WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress Popular Posts] Show most popular of posts published this month (2 posts)

  1. saharusa
    Member
    Posted 4 years ago #

    Possible ?

  2. saharusa
    Member
    Posted 4 years ago #

    Yes it is :)

    Change query line 569 to:

    $mostpopular = $wpdb->get_results("SELECT $wpdb->posts.ID, $wpdb->posts.post_title $fields FROM $wpdb->posts LEFT JOIN $table ON $wpdb->posts.ID = $table.postid WHERE post_status = 'publish' AND post_password = '' AND DATE_SUB(CURDATE(),INTERVAL 30 DAY) < $table.last_viewed AND DATE_SUB(CURDATE(),INTERVAL 30 DAY) < $table.day AND pageviews > 0 $nopages GROUP BY postid ORDER BY $sortby DESC LIMIT " . $instance['limit'] . "");

    And set your widget range to all-time
    If you do that, make sure you're using cache.

Topic Closed

This topic has been closed to new replies.

About this Topic