• Resolved Nurbis

    (@nurbis)


    Hello Lester, great plugin πŸ™‚
    Is it possible to show on top list only posts which are (for example) max 7 days old ? So it will be like top list of the week except it did not have to count views for last week, it will only exclude posts which are older πŸ™‚

    https://ww.wp.xz.cn/plugins/wp-postviews/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Sorry that is not possible. The plugin stores only accumulated views.

    Thread Starter Nurbis

    (@nurbis)

    Yes, thats what Im saying. I dont need any other views, what I need is that when there will be list of most views posts, all posts which are older than 7 days will be excluded from the list. I believe there must be a solution on wordpress for this but unfortunately Im not too good on that and php πŸ™‚ Please can you help me ?

    Plugin Author Lester Chan

    (@gamerz)

    Yeap it is possible, but I don’t provide support for custom solution, the plugin is provided as-is.

    If you need paid help, checkout http://jobs.wordpress.net/ =)

    Hi! This is the simplest solution for that:
    just go to wp-postviews.php in the plugin directory and find this code:
    post_date < '".current_time('mysql')."'
    change it to:
    post_date >= DATE_SUB('".current_time('mysql')."', INTERVAL 30 DAY)

    change 30 to whatever number of days you need.
    Don’t forget to update this code after plugin update!

    romapad, many thanks for quick fix. Will test and report back.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Posts for last week’ is closed to new replies.