Custom WP_Query, 'after' => date
-
Im wondering if its possible to only show the posts of the last 10 days with this plugin.
At the moment im using this WP_Query:
…
‘post_type’ => ‘post’
‘meta_query’ => array(
array(
‘key’ => ‘_post_like_count’,
‘value’ => ‘0’,
‘compare’ => ‘>’
)
),
‘meta_key’ => ‘_post_like_count’,
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘DESC’,
‘posts_per_page’ => 10,
‘date_query’ => array(
‘after’ => date(‘Y-m-d’, strtotime(‘-10 days’))),
…
It will show me the posts with the highes like count of the last 10 days.
Thank you very much.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom WP_Query, 'after' => date’ is closed to new replies.