0
votes
1answer
138 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
0answers
24 views

Wordpress hiding posts without content on custom taxonomy query. How to solve?

I have a custom taxonomy query for a custom post type with the following code: $args = array( 'post-type' => 'network-partners', 'posts_per_page' => -1, array( array( ...
1
vote
1answer
118 views

pre_get_posts Tax Query not working for custom author page

I am using the theme TwentyTwelve and modified the standard post query in the file author.php with the following code: function wpd_author_query( $query ) { //CODE to set $current_user_name here ...
1
vote
1answer
80 views

Hiding taxonomies with no children WP_Query & tax_query

I have this code which has taken over 7 hours to put together through research but the last hours or so I have hit a brick wall! I require the taxonomy title to be hidden if there are no posts ...
1
vote
2answers
337 views

Including all terms in wordpress tax_query

I'm a little bit confused, why I can't include all the terms in tax_query automatically? My code: 'tax_query' => array( array( 'taxonomy' => 'city', 'field' => 'slug', ...
0
votes
0answers
34 views

How to use tax_query other than by slug or id or solve custom taxonomy tags conflicts with pre-existing tags?

I just encountered a problem and realized that all tags must be globally unique. Here is what just happened to me: I created a taxonomy called writer and added each author and collaborator to the ...
0
votes
1answer
166 views

Tax query array terms display out of order

I want my tax_query terms to display posts in the order I have them listed in the array below but it is not following the order listed. $args = array( 'post_type' => 'staff', ...
0
votes
2answers
189 views

Ordering Posts with Custom Taxonomy Terms Array

I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added ...
0
votes
1answer
114 views

WP_Query tax_query - Show results if child has parent X

I've made a custom search which includes a 3 tier custom taxonomy that looks like this: continent - country - - state The search is formatting in the above way. Here is my problem: Example data: ...
0
votes
1answer
229 views

how to access the $query variable inside taxonomy-xxx.php template file?

In my custom template files, I create query in the following way: <?php $query = new WP_Query(array('post_type' => 'aya-bi-aya','author' => $current_user->ID,'paged' => $paged, ...
0
votes
0answers
123 views

When creating new terms I get PHP Notice: has_cap was called with an argument that is deprecated

I have created a taxonomy that acts like category. Then I used this code to add image to very term. All works great but I faced 2 problems. How can I remove image from term after I have selected ...
0
votes
1answer
180 views

how to use tax_query to apply both terms or one if one is empty

I'm having trouble with getting tax_query to act as a filter for posts. What I would like is to have it so it will display cpt's that have the terms of county and status but also work if terms are not ...
1
vote
2answers
461 views

tax_query not working on main query

I'm using the following code to do a tax_query and it doesn't seem to work anymore.. At some point it was working and for the life of me it wont, anymore. <?php global $pf_override; class ...
1
vote
1answer
255 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', ...
0
votes
1answer
104 views

Advanced AND tax_query in sidebar with 2 taxonomies

I have two taxonomy : brand and product. In single sidebar I am displaying the brand and product of the post in the sidebar but I would like to display all the other product of the current taxonomy ...
0
votes
2answers
424 views

How to update Wordpress custom SQL Select query for custom taxonomies so that syntax is correct?

I have a Wordpress website that written by third party web developer for version 2.9 before custom taxonomies were fully implemented. We have since upgraded to latest wordpress version 3.5.x. There ...
0
votes
1answer
255 views

Set tax_query conditionally with new WP_Query

I have a page template with a custom query: <? $filter = explode(' ', $_GET['filter']); // "page/?filter=taxonomy+term" $paged = get_query_var('paged') ? get_query_var('paged') : 1; $query = new ...
-1
votes
1answer
76 views

why do drafts return as part of wp_query?

I have some code as plugin, which I call via AJAX from a page one the site. It gets two drop-down values and uses them in tax_query to fetch some posts. Question: why do drafts return amongst results ...
2
votes
2answers
212 views

How to output content based on same custom taxonomy?

I have been trying to output content of all post-types (Posts, Pages and CPTs) based on a term of a custom taxonomy that they must share (meaning if they don't share that particular term, the output ...
6
votes
1answer
5k views

Custom Taxonomy and Tax_Query

I've been having a lot of trouble getting a WP_Query running with a tax_query on my custom taxonomy. I'm 99.9% sure that my register_taxonomy is correct, as I'm able to tag posts with the right term, ...
0
votes
2answers
240 views

WP_Query parameter conflict

I am writing a query to retrieve instances of a custom post type I created called "Specialist". In the query I specify a name and more than one taxonomy. I want to retrieve just those specialist which ...
2
votes
1answer
434 views

Order posts by (hierarchical custom) taxonomy terms and term children

The scenario a custom post type wiki a (hierarchical) custom taxonomy topics a page template archive-wiki.php The situation Posts show up and get ordered by post_date (which is the default). The ...
0
votes
2answers
182 views

tax_query not working in template

I have a custom post type called 'product' with a registered taxonomy 'product-type'. I want to display all post from a particular taxonomy from custom post type. In my case I want to display all the ...
0
votes
1answer
273 views

Tax query not producing any results

I have created a custom post type called 'course' which has 7 posts each being an individual training course. I've also tagged them with individual custom taxonomies 'course_codes' eg. h001, h002, ...
1
vote
1answer
866 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 ...
0
votes
2answers
372 views

Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request

This is my first attempt at modifying the main query using the pre_get_posts action/filter This is the function currently hooked to it: function advanced_product_search_filter($query) { ...
0
votes
1answer
1k views

How to do a particular wp_query taxonomy search

I have added a custom taxonomy called experience to the page post-type, and the taxonomy has terms "vfds" and "plcs" I am trying to create a search where a user can select one or more experience ...
2
votes
1answer
5k views

“tax_query” parameter not working with WP_Query

I have a custom post type called 'episode'. Attached to 'episode' I have a custom taxonomy called 'video_type' that contains two terms: "bonus-footage" and "episode"; "episode" contains two child ...
1
vote
1answer
547 views

Query Multiple Taxominies Across Multiple Post type's

i have searched and found some aprroved answers to similer questions but nothing i could make work or something exactly like my issue... i have 5 custom post type... each one have its own taxmonies ...
0
votes
1answer
471 views

How to limit posts to 1 from each term with tax_query?

Need 1 post from each. <?php global $post; // required $args = array ( 'tax_query' => array ( 'relation' => 'AND', array ( ...