Viewing 1 replies (of 1 total)
  • Hi there,

    You can add ‘date_query’ to the WP_Query arguments:

    $args = array(
    	'date_query' => array(
    		array(
    			'year'  => 2016,
    			'month' => 4,
    			'day'   => 14,
    		),
    	),
    );
    $query = new WP_Query( $args );

    You can get the date by using $date = explode( '-', $_REQUEST[ 'date' ] );

    • This reply was modified 8 years, 4 months ago by rvanbeek.
Viewing 1 replies (of 1 total)
  • The topic ‘How can i change url structure of cpt like this?’ is closed to new replies.