Support

Account

Home Forums General Issues Advanced Order Query? Reply To: Advanced Order Query?

  • Hi @jez

    Could you please try this code:

    $args = array(
    	'posts_per_page'	=> 4,
        'post_type' => array( 'page', 'news-articles', 'about-gorilla','involved' ),
        'orderby'   => 'meta_value_num',
        'meta_key'  => 'home_order',
        'order'     => 'ASC',
    	'meta_query'	=> array(
    		array(
    			'key'	 	=> 'home_page',
    			'value'	  	=> 'yes',
    			'compare' 	=> '=',
    		),
    	),
    );

    I hope this helps.