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!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.