Setting orderby to a custom field using pre_get_posts
Not sure exactly why, but by adding another filter using the meta_query it all started working. I now only get posts in my custom post type archive that do not have the project_update field set and are ordered by project_status. This is what I was after. $meta_query = array( array( ‘key’=>’project_update’, ‘value’=>’1’, ‘compare’=>’!=’, ) ); … Read more