Support » Plugin: WP-PostViews » How to limit most viewed posts to a 7-day period?

  • Resolved oletem

    (@oletem)


    I am currently using plugin to output 10 most viewed posts in my rss. But I also need to limit them to most recent posts from last 7 days. Ia m using using get_most_viewed(‘post’, 10). How can I limit my output?

Viewing 1 replies (of 1 total)
  • oletem

    (@oletem)

    Added

    'date_query' => array(
    		'after' => '1 week ago',
    	),

    to the Function: Display Most Viewed Page/Post
    in wp_postviews.php

    It seems to work now

    • This reply was modified 10 months ago by oletem.
Viewing 1 replies (of 1 total)
  • The topic ‘How to limit most viewed posts to a 7-day period?’ is closed to new replies.