You can use meta query as give below:
$args = array(
'post_type' => 'location_type',
'posts_per_page' => 10,
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'OR',
array(
'zip' => 'zip-value'
),
array(
'town' => 'town-value'
),
),
);
Related Posts:
- Include custom taxonomy term in search
- Advanced search form with filters for custom taxonomies and custom fields
- How to replicate some of Drupal Views functionality in WordPress?
- Exclude from search all custom posts which are NOT in a taxonomy term
- Exclude a term of a taxonomy with a custom post type in a search
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Custom search for custom post type, custom meta and search fields
- SQL to update custom post taxonomies
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- How to search from specific post type with tags?
- Include different loop templates in search query
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- CPT Search Form with Taxonomy filter & Or
- Keyword search limited to specific post type filtered by multiple custom taxonomies?
- How to create an advanced filter search?
- Search Custom Post Type & Taxonomies
- search also in taxonomy, tags and custom fields
- WordPress sort search results by custom order
- Including metaboxes from custom post types in global search — continued
- Pretty URL for custom search for custom post type
- Auto Complete Search
- Search by tag name and category
- Advanced search form with filters for custom taxonomies
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- Include custom taxonomy term in search
- how to get this tax_query working?
- Custom Taxonomy Search result page
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Hide custom post type from search based on custom taxonomy
- Ideas on how to organize a project [closed]
- Multi Parameter search with custom post type category and tag
- How to Implement Search Functionality?
- How to have multiple search result pages in wordpress with taxonomy terms listed
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Live search by custom tag
- Custom search for a custom post type in WordPress
- How to transfer categories (default) to custom taxonomy?
- Extensive search filtering and results->PDF in the front-end
- Advanced search form with filters for custom taxonomies and custom fields
- Archive custom template from search
- Custom Field Search
- Search for portfolio tags & mixing portfoliotags and post tags
- Best way to save horoscope data
- Which post does a taxonomy term belongs to?
- How can I set taxonomy programmatically
- How to hook custom taxonomies to custom post types and make the permalinks work?
- Custom post type multiple loop by taxonomy term
- getting all values of a custom taxonomy if there is no post
- Can I search only some of the fields of a custom post type?
- Custom Post Type And “fopen”
- custom types taxonomy hide_empty
- Help need making decision. Ads rotating site on wordpress
- Extending AZIndex plugin to use custom post types and custom taxonomies
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- A question on creating filters for custom posts using taxonomy
- Conditional Query of Custom Post Type and custom taxonomy
- Listing tags from a custom post type
- List custom taxonomy specific to one custom post type
- Is $object_type truly required with register_taxonomy()?
- Custom Taxonomy back-end customizations
- Filter custom posts using auto populated dropdown selectors
- Show a Category X’s custom post type on Category X archive page?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- Get Taxonomy Term Title by it’s URL
- Add custom taxonomy to post content body?
- custom taxonamy and post type
- Taxonomy custom post type URL
- Display as tree terms of taxonomy and custom posts for each term of taxonomy
- Make parts of your wordpress website completely built with data from external APIs?
- Second Set of Eyes: One custom taxonomy shows in Appearance > Menus, one does not
- Custom post type url with category
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- How do I move/order posts with a tag to the end?
- Adding custom post category slug in permalink causes 404 error for pages and posts
- Add custom image size for custom post type or taxonomy
- Get taxonomy values based on wp_query results
- Display post as term id
- Ajax Custom Post Filter is not filtering
- Need Output Custom Taxonomy from Custom Post Type
- Display all taxonomy terms, add class if term applies to current post
- How to filter wp_list_categories output with some custom post type meta query?
- Custom Post Type – No Results Found
- Return the latest post from a custom Taxonomy and Post Type
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Don’t know how to show custom taxonomies from a custom post_type
- How to Filter custom post type by taxonomy?
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- Custom taxonomy rewrite give pagination 404
- How to duplicate entire custom post type
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Use Custom Post Type archive page for the taxonomies term archive page
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Is it possible to have dedicated page for parent/child taxonomy?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Can a Custom Taxonomy be named “category” like normal Posts?
- How to use terms from the same custom taxonomy in different roles in a custom post type?
- How to have the same url structure for both a CPT and a Taxonomy?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?