We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [date-query]

Refers to a parameter passed into the WP_Query. Used to query posts by specific dates.

Filter by
Sorted by
Tagged with
1
vote
1answer
283 views

How to combine tax_query and date_query in Wordpress

I'm using the following query to extract all products which are not in the 'Service' product category and order them by a custom meta field '_vintage_age'. $q->set( 'tax_query', array(array( '...
1
vote
3answers
1k views

Get only modified posts

I'm using this code for generating a Feed from lasted modified post mysqli_query( $conn, "SELECT * FROM wp_posts WHERE post_status = 'publish' AND post_type = 'post' ...
1
vote
1answer
818 views

Date Query to Pull Current and Future Posts

I'm trying to use date_query to query posts with todays date or a future date. Think events, I don't want to show any posts which has a date before todays date. I'm using pre_get_posts and setting the ...
0
votes
1answer
27 views

Add to previous posts under post

Goal: After each post (that contains under a certain amount of words), display the two posts that were published before it in that category/tab. I found this on stack, where they do something ...