date parameter ‘after’ to query string
-
How do you write the ‘after’ date parameter as a URL query string?
To write these date parameters as a query string:
$args = array( 'date_query' => array( array( 'year' => '2016', 'month' => '10', ), ), );you just do
year=2016&month=10as mentioned here: https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters These work perfectly fineHow do you write the the following as a query string:
$args = array( 'date_query' => array( array( 'after' => '1 month ago', ), ), );
The topic ‘date parameter ‘after’ to query string’ is closed to new replies.