Support

Account

Home Forums Backend Issues (wp-admin) Query two fields and orderby another Reply To: Query two fields and orderby another

  • I found a WP ticket that says there’s currently an issue with meta_query and the ‘OR’ relation that I think is causing the issue – https://core.trac.wordpress.org/ticket/25538

    As a temporary solution I’m instead filtering out all non ‘Faculty’ and ‘Staff’ members by using ‘NOT LIKE’ meta_query(s):

     'meta_query' => array(
            array(
                'key' 		=> 'profile_type',
                'value' 	=> 'Adjunct',
                'compare' 	=> 'NOT LIKE'
            ),
            array(
                'key' 		=> 'profile_type',
                'value' 	=> 'Emeriti',
                'compare' 	=> 'NOT LIKE'
            ),
            (etc...)
        )