Support

Account

Home Forums Front-end Issues Sorting by date Reply To: Sorting by date

  • Hi @NWTD

    Thanks for the screenshot. Can you confirm that this setting has never been changed and that all posts have saved in the correct format?

    Perhaps you have another issue in your WP_Query args. The best way to find the issue is to remove parts from the args one at a time until the issue resolves itself.

    
    $args = array(
    		'post_type' => 'portfolio',
    		'posts_per_page' => -1,
    		'meta_key' => 'date_received',
    		'orderby' => 'meta_value_num',
    		'order' => 'DESC'
    	);
    	$query = new WP_query($args);
    		
    	var_dump( $query->have_posts() );
    

    Perhaps remove the orderby and order? perhaps remove the meta_key also?

    Thanks
    E