Home Forums ACF PRO Return Featured articles first Reply To: Return Featured articles first

  • Hi.

    I had a similar problem where I had a custom post type for FAQ’s and I wanted to put the top five questions at the top then followed by the rest.
    I was tearing my hair out before I saw John’s answer above. At least in my case I had to update all the posts after I had created the custom field I wanted to sort against.

    It could be even more elaborate I guess but this does the trick for me.

    $args = array(
    	'post_type' => 'faq',
    	'posts_per_page' => -1,
    	'meta_key' => 'top_five',
    	'orderby' => 'meta_value',