Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dFactory

    (@dfactory)

    Hi,

    It’s not only possible but also possible with WP_Query. We’ve extended it with additional views_query parameter:

    'views_query' => array(
    	'year' => 2016, // YYYY
    	'month' => 06, // MM
    	'day' => 06 // DD
    )

    You may use year, month, day together or separateley (for e.g. to get the views for specific year).

    Regards,
    Bartosz / dfactory team

    Thread Starter vayzor

    (@vayzor)

    Hello,

    Sorry, but how do I specify a start date and an end date using this method?
    (e.g. Start date: 2016/01/15, end date 2016/02/19)

    Plugin Author dFactory

    (@dfactory)

    You’re right – it doesn’t provide an API to have the date range query.
    For now the only option you have is to make a direct db query.

    Thread Starter vayzor

    (@vayzor)

    Okay,
    Thank you

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

The topic ‘Get posts (and their view count) within date range’ is closed to new replies.