All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
0answers
29 views

Tax Query for custom Taxonomy field

I have a stock filter on WooCommerce shop page. So I need to filter number of products based on the selection from the user for this filter. I have variable products and I am not able to control ...
0
votes
1answer
56 views

WP Query Conditionally query meta and taxonomy

I develop a plugin which includes a custom post type that is displayed as a list within WP Admin. There are varying levels of users defined within the plugin and a few other options which determine ...
1
vote
0answers
68 views

Why is this query not working? (Standard posts + custom post type)

I'm trying to figure out why this query is not working, as it seems like it should be very straightforward. Basically, I'm querying for both standard posts of certain categories (and excluding another)...
1
vote
0answers
425 views

Using meta_query and tax_query at the same time

I’ve got the following query on my page template: $args = array( 'post_type' => 'givingback', 'post_status' => 'publish', 'posts_per_page' => 100, '...
1
vote
1answer
1k views

Tax query AND/OR meta query

In my WP_Query I'd like to have a tax query and a meta query, but I want the results to include results that match the tax query AND/OR the meta query - if I do it like the below, then it only returns ...
0
votes
1answer
1k views

How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?

I need to search property post types, in a regular WP_Query that is not the main query, but I need to be able to search for a value LIKE in any of the following meta_queries and also need to search ...
0
votes
1answer
751 views

Is it possible to add relation between meta_query and tax_query?

I have custom post type with some ACF fields. I use ACF for extra properties of entity, and I use native wordpress taxonomies too for base category of entity. So I need to build query with meta_query ...
0
votes
0answers
1k views

Combine tax_query and meta_query in WP_Query

I'm building a search in WordPress. I look for a custom_post_type in combination with several custom taxonomys and metadatas. custom_post_type: vehicle taxonomys: brand, fueltype, ... metadata: ...
0
votes
1answer
78 views

Complex Taxonomy scheme

We are building a resorts site and we're facing a huge taxonomy problem. On one side, we have administrative locations such as country>>region>>department and "natural" locations, such as mountain-...
0
votes
1answer
144 views

Not able to get my custom search result using meta_query and tax_query together?

I created a custom search where i am able to show the Fields (ACF fields) and also Taxonomies. But while I am searching by taking the combination of both Taxonomies and meta fields, i am not getting ...
1
vote
1answer
1k views

WooCommerce: filter by parent product's taxonomy and product variation's meta data

In WooCommerce, I would like to filter my products page based on product variation's meta and related variable products's taxonomy. Note: All products have variations, there's no product without ...
0
votes
4answers
5k views

Use both meta query and tax query

I would like to use both the meta_query and the tax_query, but using the following I can get results for the meta_query. What am I doing wrong? $wp_query = new WP_Query( array( 'post_type'...
0
votes
1answer
538 views

Using get_posts, I need to use a combination of OR & AND relations

Using WordPress v4.6, I set up arguments for get_posts() based on price (2 conditions), sku, and categories like this: [meta_query] => Array ( [relation] => AND [0] => ...
0
votes
2answers
442 views

Extending WP Query: Custom geolocation meta values work, but tax_query breaks

I've built a custom query for geolocation searches. I'm saving lat and lng within each custom post type as a meta value. My query extension returns results successfully when lat and lng are the only ...
-1
votes
1answer
365 views

Querying by taxonomy vs Querying by Custom fields Speed Comparison

I'm developing a listing portfolio for our project. (Basicaly yachts with their type, size, price, cabins, draft, build year, refit year etc.) I should filter them according to type and sort by (...
0
votes
1answer
4k views

WP_query - Filter by tax_query and meta_query using multiple select

I have a Publications Post Type, a Writers Taxonomy and a Publications Custom 'Meta Box' Value; parent_id. In my archive-publictions-post.php template I am trying to filter the WP_Query Class, with ...
0
votes
1answer
740 views

tax query between operator like

I have a custom post called person and a taxonomy(like tags) called age. As far I have search tax query doesn't seem to support the between operator like meta query does. Is there a way to accomplish ...
2
votes
1answer
1k views

Query for custom post type objects in a taxonomy and with a meta value

I want fetch all posts from the post type book in the custom taxonomy book_tags with the meta key lang and the meta value en. My code: <?php $args = array( 'post_type' => 'book', ...
19
votes
3answers
45k views

Nested meta_query with multiple relation keys

I am curious whether Wordpress is able to run nested meta_query, with each having different relation keys? As of Wordpress 3.0, tax_query is able to perform this function; I'm wondering whether this ...
1
vote
2answers
3k views

search query within custom taxonomy term, post title and meta field

I want to create a search that does: Search within my custom taxonomy - custom-tags search the post title search select meta field ?? dont know search with custom post type - easy part I looked ...