Should be easy enough. First, get the City.
<?php $city = get_field('city'); ?>
Then in your WP_Query, insert the taxonomy parameter:
<?php $loop = new WP_Query( array( 'post_type' => 'member', 'posts_per_page' => -1, 'location' => $city ) ); ?>
Et Vilola: you only get the Members that have the taxonomy $city.
Related Posts:
- How do I ensure that post_type and Taxonomy use the same slug?
- Order by custom field attribute
- Advanced search form with filters for custom taxonomies and custom fields
- What should I use – Taxonomies, custom fields, Post Type?
- Creating Photo Gallery System with Custom Post Type
- Ajax filter with custom taxonomies
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Custom Taxonomy order by Custom Field
- Is there any performance consideration when using Custom Post Types?
- Custom post type / custom fields
- Show ACF field from custom taxonomy and display on the single template
- Get Custom Field Values by Another Custom Field in WordPress
- Custom Posts Hierarchy? (State/City/Restaurant)
- wp_query to find posts by year and month
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Weird problem happening with custom taxonmy when creating/updating posts
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- How to display selected taxonomies by their parent
- Custom Field Order by Last Name and First Name
- Get custom post type list for every category shortcode
- search also in taxonomy, tags and custom fields
- Query & Order posts by custom fields
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- Show custom post type relationships by taxonomy
- get_post_meta not working on publishing
- Using custom field content as expression in IF statement [closed]
- Dynamic dropdown select values depending on other custom field value
- Hierarchy and access control for Custom Post Types (CPT)
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- Different Category system needed for the Custom Post Type
- Trying to get custom post of a custom taxonomy
- Creating custom post type with custom taxonomy and custom fields programatically
- Different options per post type in WP_Query
- How to get_term_meta on single custom post?
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Many to many to many custom post relationships
- Get data from PHP to JavaScript to set position of each post on front page
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Query custom post types & Taxonomies and list them in a table on a page
- Custom post type and custom taxonomy 404 on page 2
- How to fetch custom post types with its full data on wordpress?
- Nested Custom Taxonomies | Incorrect posts when querying
- Get custom term meta problem on single post type
- Commas not displaying in implode
- add custom tags for custom post type in wordpress
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How do I show my containing my custom field ONLY if there is a set value on that custom field? [closed]
- CPT Repeatable Fields + Undefined Index
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Custom post types category
- Function to erase every post from a taxonomy
- Using page title as a link to term archive
- Custom Taxonomy dont save in a frontend form for post a custom post
- Should i use custom post type for a custom footer?
- Order custom posts by taxonomy, then by meta_key
- Setup page template array in a custom post type
- Writing a custom Glossary plugin
- How to get post count of specific taxonomy that have store name & category
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Custom taxonomy terms as children of multiple custom post types
- ACF – Retrieve custom taxonomy from a relationship field
- Custom front-end form for adding post – Category problem
- set object terms after some some time of published post – functions.php
- update custom taxonomy custom fields
- Filter taxonomy by CPT
- Alike Shortcode using in Custom Shortcode
- Query custom post type that has a serialized relational advanced custom field value
- Display Posts that fit a certain criteria on Category pages
- Sort custom post column by generated value?
- PHP Warning with Custom Fields
- I want to create a metabox under custom taxonomy
- Filter Custom Post Type Posts by Taxonomy
- Change Search display for Custom Post Type
- Custom search for a custom post type in WordPress
- Query posts by multiple custom fields
- tax_query not working?
- PHP Notice: Unidentified index
- Add active class to foundation 6 tabs while looping categories
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- WordPress query posts by custom post type not workng
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Can’t pick up a field created with Advanced Custom Fields
- Pods pagination erases my sub menu
- Best way to use Category & Custom Fields?
- Function not pulling image or text from custom post type
- WordPress Custom Post Type and sort by Tags
- custom taxonomies are not showing up in get_taxonomies
- Storing/querying custom date data
- Looping taxonomy in taxonomy?
- posting twice from an array?
- How do I filter a custom post type loop by a field?
- Custom Post type as Taxonomy
- Get custom post fields and display them
- Display ONLY ONE $term (Out of 4 terms) from a Custom Taxonomy and CPT
- Send email on creation of custom post type and use get_post_meta()
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Custom Sort Order for Custom Post Type Taxonomy