• 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=10 as mentioned here: https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters These work perfectly fine

    How do you write the the following as a query string:

    $args = array(
    	'date_query' => array(
    		array(
    			'after'  => '1 month ago',
    		),
    	),
    );
    • This topic was modified 9 years, 7 months ago by Andrew.
    • This topic was modified 9 years, 7 months ago by Andrew.
    • This topic was modified 9 years, 7 months ago by Andrew.

The topic ‘date parameter ‘after’ to query string’ is closed to new replies.