Ok i manged to create the solution by finding that LIKE condition can be used in meta query. so here is the final code..
$args=array(
'post_type' => 'tyre',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'tyre-category',
'field' => 'ID', //can be set to ID
'tag' => 'ID', //can be set to ID
'terms' => $catid //if field is ID you can reference by cat/term number
)
),
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'size',
'value' => $size,
'compare' => 'LIKE'
),
array(
'key' => 'terrain',
'value' => $terrain,
'compare' => '='
)
)
);
Hope it will be useful for someone 🙂
cheers
Ayaz Malik
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
- 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
- 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”?
- Custom Search | check multiple meta_value for search value
- Hide custom post type from search based on custom taxonomy
- Ideas on how to organize a project [closed]
- 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
- 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
- Get The Post Type A Taxonomy Is Attached To
- Shouldn’t this be easy?! Custom post type/custom taxonomy permalink
- Custom Post type & Taxonomy URL structure
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Two Custom Post Types, Share Two Taxonomies
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Search form not working in localhost
- How to display recent posts added in custom post types
- Permalinks when filtering multiple custom post types by single taxonomy
- Filter custom post type archive page with custom taxonomies (categories) with AJAX
- How-to leverage WordPress for creating Extended Social Profiles
- How can I filter by taxonomy on a custom post type’s page?
- How To Create A Custom Taxonomy 404 Page
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Query Multiple Taxominies Across Multiple Post type’s
- Custom Post hierarchical to custom taxonomy
- Conditional Query of Custom Post Type and custom taxonomy
- Specific query for custom post type
- Get post count for search result based on post type
- Suggested Post and Taxonomy structure
- Use custom walker to add taxonomy terms to main nav menu
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- Add “Select All” to custom taxonomy
- Disable custom taxonomy on admin bar
- how to show records that don’t have custom meta value
- How to group search results by post type and only if post type result is not empty?
- Add term slug in URL of custom post type details page
- Custom post type and custom taxonomy 404 on page 2
- How should I structure complex content hierarchies?
- Querying two different post types with the same taxonomony
- Custom Post Type URL Rewrite’s
- Add term for custom taxonomy from front end
- Modifying search results based on post_type
- Auto Generate Post Title from 2 Custom Fields
- How do I make a request in my browser to search the CPT taxonomy?
- i want to send email to user when the custom taxonomy is changed
- Issues with static pages redirecting towards home.php
- Custom post type template – add banner under heading
- Get dropdown child categories from parent category of custom post type
- How do you create pillar content pages?
- Custom post type single page returning 404 error when sharing archive url with custom taxonomy
- Query first and last name from custom post type
- Grid slider with custom post type (how to filter with taxonomies?)
- Set different posts_per_page for custom post type/taxonomy
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Change the url of a custom post type to include taxonomy
- Creating adminable dynamic filtering on custom post type
- Complex strcuture as CPT or taxonomy for use in woocommerce product variations [closed]
- WP_Query for CPT with filter by another WP_Query
- Get posts in same category not working
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- How to show a custom taxonomy using a custom template
- Get Registered Custom Post Type to get All Custom Taxonomies
- Parent cpt/child custom post type URL permalink relationship
- How to make a single Menu Item call another Mega Menu for Custom Post Types and Custom Taxonomies?
- Display ONLY ONE $term (Out of 4 terms) from a Custom Taxonomy and CPT
- Filtering custom post types using category taxonomy
- How to use wp_set_object_terms depending on page ID?