0
votes
0answers
26 views

Get current terms info when querying by multiple taxonomy terms

I'm currently using the following in my archive template to create a menu of taxonomy terms and add a 'live' class to the term that's currently being queried. $termsA = get_terms('MYTaxA', array( ...
0
votes
1answer
143 views

Using in 'category_name' in '$query->set();'?

Here's the function I have in my theme's functions.php: function better_editions( $query ) { // Categories act as 'Editions' on my site $get_edition = get_query_var( 'category_name' ); ...
0
votes
2answers
247 views

When/why does '$query->get( 'tax_query' );' return empty?

First the code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( 'post_type', array( 'post' ) ); ...
0
votes
1answer
133 views

Query set using tax_query with relation 'OR' modifies category object?

(Update: Please see the edits far below.) The code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( ...
0
votes
0answers
20 views

Can I get parent taxonomy name from term in advanced search plugin?

I am currently trying to advance a plugin that basically creates a form where you add your own required types of data that you would want to be searched. In my form I have a taxonomy and I want to ...
0
votes
0answers
160 views

Adding a query var to taxonomy term archive - gets redirected to the other taxonomy archive page

I want to pass another query var in the URL through a form while I'm on a taxonomy archive page. The URL would look like so ...
0
votes
1answer
150 views

How can I get the name of term post meta value which equals term id

I have a custom taxonomy (location) that is being populated automatically by an advanced custom field on user save. The issue is that it saves the term_id in the postmeta meta_value field. When I echo ...
1
vote
2answers
130 views

How to List Parent Term Links for Custom Taxonomy With & Without Children?

I have a Custom Post Type of "projects", that is categorized by a Custom Taxonomy of "industry", which is heirarchical. Projects & sub-projects are assigned to the industries. For Example, the ...
0
votes
1answer
77 views

List related terms + taxonomies

I have a set of main categories for a set of products. All these products has additional taxonomies associated with them. On a product category page, is there a way I can get all terms in use for ...
1
vote
0answers
268 views

Exclude posts with taxonomy term from appearing on home page query

I am really confused about this one, I am usually pretty good at working out basic queries but I can't seem to work this one out. Please see below my index.php query. Now it is not your basic query ...
0
votes
1answer
227 views

How can I query all post with currrent taxonomy term?

I created the taxonomy 'machine types', and added several terms to it, like 'cranes' for example. The url to that term now looks like this: domain.com/machine-types/cranes How can I make this url ...
0
votes
1answer
140 views

Passing values by form to create a query

I have this structure: taxonomy - term1 -- child term1 -- child term2 -term2 -- child term1 -- child term2 I have two select boxes. First one shows the parent terms (term1 ...
0
votes
1answer
369 views

How to get the term description in a taxonomy term archive query?

I'm creating a template for a custom taxonomy for my theme. At the beginning of the page, before the loop that lists all the posts associated to a term of that taxonomy, I want to output the ...
0
votes
1answer
61 views

Retrieve all term IDs of post

I have an array of term IDs that I'd like to filter my query with, but most wordpress functions seem to need the 'taxonomy' field entered too. Is there a reason for this? Passing the taxonomy ID ...
2
votes
1answer
707 views

orphaned taxonomy terms remove by sql query

I have 3 custom post types each of these CPT's have posts that are set to auto delete via a given time scale by cron jobs, thing is when they are deleted it leaves behind orphaned taxonomy terms in ...