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
- How to Add Custom Fields to a Custom Post Type?
- Get Custom Taxonomy ID within loop
- What should I use – Taxonomies, custom fields, Post Type?
- Search that will look in custom field, post title and post content
- clients list using wordpress
- Custom Taxonomy Template Post List with Sort Order
- Get custom post type by category in a page template
- Creating Photo Gallery System with Custom Post Type
- How to do a custom bookmarks post type?
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Categories under custom post types doesn’t show properly
- How to select one major category (or custom taxonomy) for a custom post type?
- Ajax filter with custom taxonomies
- Add additional field to custom post_type
- Get term name without a foreach loop
- Custom post type’s extra fields – how to handle?
- Trying to get custom post of a custom taxonomy
- Creating custom post type with custom taxonomy and custom fields programatically
- Control content before and after custom post type loop
- Targeting categories in custom fields
- Get custom post type categories to show up in menus
- Custom taxonomies to define versions of a product
- Show current custom taxonomy
- finding and using post type fields in WordPress
- Custom Taxonomy Search result page
- 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
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Creating a non-hierarchical Taxonomy that behaves like categories
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- 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
- Reusable metabox backend and frontend
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Get custom term meta problem on single post type
- Custom post type name and assigning custom taxonomy
- 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]
- Building a Portfolio and need some direction
- 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
- Let users upload image(s) to the post from front end
- Foreach loop returning more than one item when querying taxonomy
- Function to erase every post from a taxonomy
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Using page title as a link to term archive
- Custom Taxonomy dont save in a frontend form for post a custom post
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Making a form for user to add new custom post with custom taxonomies and custom fields
- 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
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Writing a custom Glossary plugin
- How can I sort the order of multiple custom field values in a custom post type?
- Custom post type page with parameter
- Function not pulling image or text from custom post type
- predefined custom field on registration page
- Values inside a custom field to determine which category posts to display
- Exclude Custom Post Type from shared Custom Taxonomy
- WordPress Custom Post Type and sort by Tags
- custom taxonomies are not showing up in get_taxonomies
- Storing/querying custom date data
- Select Menu for Custom post Type does not save
- Looping taxonomy in taxonomy?
- Advanced search form with filters for custom taxonomies and custom fields
- Custom post type and custom taxonomy archive inaccessible
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- posting twice from an array?
- Custom Loop for custom post type. Compare by meta_value?
- Inserting two categories
- How do I filter a custom post type loop by a field?
- Custom Post type as Taxonomy
- How to change order of custom post types. I want Featured post to come first
- 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()
- How do loop categories post from according in WordPress? is it impossible to solve this problem?
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- I want to show image from custom field image on my custom page template
- Custom Sort Order for Custom Post Type Taxonomy
- WP_Query not using relation key as expected and not producing any results
- Creating subpages for each custom post type
- Category display using conditions
- edit index custom post type page with elementor or other