Support

Account

Home Forums General Issues Query Posts by User ACF Field Reply To: Query Posts by User ACF Field

  • Hi John, after thinking through the information you provided, I was in fact able to come up with an easy solution:

    
    $office_employees = get_users( array(
    	'meta_key' => 'office_name',
    	'meta_value' => 'Office 1',
    	'fields' => 'ID'
    ));
    
    $office_listings = get_posts(array(
    	'author__in'     => $office_employees,
    	'posts_per_page' => -1
    ));
    
    if( $office_listings ):
    	
    endif;
    

    Thanks!