0
votes
0answers
12 views

Filter terms bases on multiple taxonomies - operator not in? [duplicate]

Building a function for filtered taxonomies. How to use 'operator' => 'NOT IN' or 'operator' => 'IN' inside the query to only show tax_query terms that are connected to all taxonomies instead of ...
0
votes
1answer
30 views

relation OR instead of AND - Filtered term ID's in loop

Question not related anymore.. First I tought about the relation OR/ AND for results, but I believe I should work with 'operator' => 'NOT IN'. I would like to query the results that meet multiple ...
0
votes
0answers
17 views

include taxonomy terms in search query

I currently have a search query set up that only displays the post_type of listings in the search results, I want to amend this query to include a custom taxonomy also. I have a custom taxonomy for ...
1
vote
1answer
27 views

display posts with same taxonomy term

I'm trying to display 5 related posts in the loop, those related posts being posts that share the same taxonomy value. e.g. I have a custom taxonomy set up called venues thus each post has a venue ...
0
votes
0answers
23 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
0answers
8 views

*Add* items in a certain taxonomy to existing posts with pre_get_posts()

I've seen somewhat similar questions on here, but not exactly what I'm trying to do. Assuming I have this: function eg_homepage_pre_get_posts( $query ) { if ( ! is_admin() && ...
0
votes
0answers
30 views

wordpress page filter problems

Hello I been working on post type filter so I can filter my content for taxonomies type but for what ever reason I can never get it to filter when I click filter public function product_filters( ...
0
votes
1answer
35 views

Taxonomy.php how to show post only in current taxonomy with wp_query?

Having troubles to get my taxonomy.php working good. I use a taxonomy.php to list all my posts in a specific category but it shows every post I have in all categories. Here is my code: <ul ...
-1
votes
1answer
143 views

How to query posts from specific authors and categories using WP_query?

I currently have a WP_query where I am getting posts from a specific set of authors. To this, I want to add specific categories as well. $args = array( 'author__in' => $authors, 'posts_per_page' ...
0
votes
2answers
55 views

Remove category from query (show all posts in archive.php) pre_get_posts()

I am using pre_get_posts() to allow all posts to be displayed on any category archive. This is because I will provide a javascript sorting and filtering method using isotope.js. Any category page will ...
4
votes
1answer
22 views

WP query taxonomy input differs to output?

I'm trying to build a custom query and I need to include the current category ID. I previously had the WP_Query args as: Array ( [post_status] => publish [posts_per_page] => -1 ...
0
votes
0answers
12 views

WP query taxonomies not the same as output

I'm trying to build a custom query and I need to include the current category ID. I previously had the WP_Query args as: Array ( [post_status] => publish [posts_per_page] => -1 ...
0
votes
1answer
47 views

How to display elements of different post types?

What happens is: I have a custom post type called "placas" and have an associated custom taxonomy called "firmas" and this taxonomy is the terms "LG", "AOC", "Panavox". I want to show a certain ...
0
votes
0answers
48 views

urlencode error with checkboxes in wp_query using tax_query and taxonomies

I am making a search that taps into wp_query and filters thru custom taxonomy terms. It works, but I get a urlencode warning when using checkboxes to filter thru taxonomy terms assigned to POSTS, but ...
1
vote
2answers
36 views

Displaying results from custom taxonomy query

I have created a custom taxonomy Region and I would like to query this taxonomy for all results and display them. My query is: $args = array( 'tax_query' => array( array( 'taxonomy' ...
0
votes
0answers
104 views

category_name not working in WP_Query

I have a custom post type and I wanted to show posts just from a certain category but its not working. Here is the code: <?php // Reset post data. wp_reset_postdata(); $photo_group = 0; // For ...
0
votes
1answer
70 views

Query custom taxonomy for category including children

I've using the Events Manager plugin which creates a custom post type of 'event' and a custom taxonomy called 'event-categories'. I have the category 'courses' which has an ID of 43. I also have a ...
0
votes
0answers
39 views

Show Child Taxonomies in Posts Dropdown

I've written a simple dropdown script and I am looking to expand it to include the child taxonomies and posts. I'm not quite sure how to accomplish checking if there are child categories for $tax_slug ...
0
votes
1answer
48 views

Don't repeat posts from children in parent taxonomy query

I have a query on a page and I want to prevent it from returning posts in the parent term that have one of the child terms of the parent. For example: Parent 1 Child 1 Post 1 Post 2 NOT Parent ...
1
vote
0answers
47 views

Automatically Query Parent Taxonomy

I have a custom taxonomy on my site that I query from the sidebar of the currently displayed term. Say I am on the Term X archives, then my custom post type of Products with the term of Term X are ...
0
votes
1answer
43 views

Multiple loops on a Search result page?

I have a custom template that displays search results based on a plugin. The wp_query contains all the taxonomy information to show the proper posts. How can I have two loops on the same results ...
0
votes
1answer
325 views

Get posts from multiple tax terms

I'm trying to get related posts by taxonomy term. So a post tagged to 'London' would have related posts tagged to London. The code I have works if the post is tagged to a single taxonomy term only - ...
0
votes
0answers
32 views

Display posts from custom post type organised by taxonomy term

Is there a way that I can list all the posts within a custom post type organised by their custom taxonomy term? For example; I have 9 posts in a custom post type custom_post, separated into 3 terms ...
0
votes
0answers
69 views

Query/Loop multiple taxonomies in taxonomy template

How to Query multiple taxonomies in taxonomy template, ex. taxonomy-schools.php Please help, Ihave spend many hours trying to fix this.. Here's my code: <?php $term =$wp_query->queried_object; ...
0
votes
1answer
391 views

is_tax() function not working as expected

I'm facing an issue with the is_tax() function. I'm a class method that fetches a specific custom post types. These custom post types have taxonomy related custom fields (among other custom fields). ...
0
votes
2answers
433 views

How to display post from current Taxonomy in archive page?

I am using the following code to display a random post from the current category in category archive page (using archive.php). However, when in Tag or Taxonomy archive pages, the post is not correctly ...
1
vote
1answer
560 views

Why is my WP_Query not working when tax_query terms are an array?

I have an issue with a WP_Query for a site I'm building which has me stumped. This works as expected: $package_args = array( 'post_type' ...
0
votes
1answer
94 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 ...
1
vote
1answer
520 views

Combine two taxonomies in a hierarchical tree

For example, I have WooCommerce products that have taxonomies: brand (e.g. Converse, adidas, D&G) (taxonomy id: product_brand) category (e.g. Boots, Sneakers, Sandals, Heels) (taxonomy id: ...
2
votes
1answer
90 views

Filter WordPress posts by between parameter

How to filter WordPress posts by a taxonomy and between parameter? Consider a mobile website with "memory size" taxonomy, I need to show posts that have more than 256 mb memory and less than 768 mb. ...
0
votes
1answer
300 views

wp_dropdown_pages with tax_query clause

I'm display a dropdown list of custom post types in wordpress. This first block of code uses WP_Query $houseQuery = new WP_Query( array( 'post_type' => 'house', 'order' ...
0
votes
1answer
3k views

List all custom post type posts from a given category?

I have a custom post type myposttype and it's taxonomy is called myposttype_categories. myposttype_categories have multiple terms inside, such as foo and bar. The tricky question is - how do I list ...
0
votes
2answers
643 views

WP Query with custom taxonomy

I'm just getting used to the WP Query and was hoping I could get some assistance on this. I've created a custom taxonomy (theme) and now want to display the latest post with one of these taxonomies ...
0
votes
1answer
534 views

How to Order a list of taxonomies? orderby?

I am using this code to fetch a list of child taxonomies. I want the order displayed to be alphabetical, but it is not! Any help in figuring out how to do it? I guess ordering it before returning it ...
0
votes
1answer
638 views

Query Custom Post Type by Taxonomy

I've created a query working fine pulling posts from a specific taxonomy—but before I had only 7 taxonomies that were permanent, now I have sub taxonomies under that main taxonomy and they will be ...
1
vote
1answer
104 views

Advanced Taxonomy Queries Wordpress

I am working with wordpress and business listings. I have about 5000 business listing all over the usa. Each business listing has a custom field for state, county and city and brands. My business ...
1
vote
2answers
222 views

How to add terms to my tax_query based off of the current post

I need the terms in my tax_query to be the ones from the current post. I am trying to this by using a variable. The value of the variable is given by using the get_terms() function. The problem is ...
1
vote
1answer
347 views

Why does querying on post_tags (which has been applied to custom post types) only return posts?

So I've created a little jquery cycle based feature rotator that pulls from the post_tags. I added the post tags to my other custom post types like this: register_taxonomy_for_object_type('post_tag', ...
0
votes
1answer
330 views

Show multiple tax_query from 2 or more post_type in a single code

i've been trying with no success to show 2 custom taxonomies from 2 post_type, here's my code: <?php /** * Display a list of the most recent news in 'Avisos' ...
0
votes
1answer
202 views

Taxonomy order exception for specific term

I want to make an exception for my custom taxonomy order. Sometimes you need to put "Other" option as last option but when calling taxonomies with "orderby=name", sadly "Other" term is not listing as ...
0
votes
1answer
750 views

Avoid WP_Query's duplicate posts with taxonomies

Given a blog featuring several categories (such as "Sport", "Nature", etc), I've then proceded to create a custom taxonomy, which allows me to show articles in certain areas of my blog with terms such ...
0
votes
2answers
343 views

Custom taxonomy in WP_Query not working

I'm truly stumped here. I have a specific taxonomy for sorting posts into different types of "featured" posts on a news site. Here's the problem: When querying by them the results aren't what they ...
0
votes
1answer
1k views

Adding session variable and/or cookie based on user-selected input

I am working on a classifieds website that has a custom taxonomy called 'countries'. In the main header menu I have these categories showing in a dropdown list of particular countries people can ...
1
vote
2answers
975 views

How do I search inside specific taxonomies in Wordpress

I am trying to search for posts in specific taxonomies but any time I search, I get results from all the other pages instead of Wordpress searching within the selected category in the taxonomy. I ...
2
votes
2answers
2k views

Advanced Tax Query

Below is my tax query, at the moment this returns all posts which have at least one of the specified terms. Is there a way I can have it return only posts which have ALL of the specified terms? ...
17
votes
2answers
10k views

Using wp_query is it possible to orderby taxonomy?

My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query. Now my problem is I would like to orderby the taxonomy, but from documentation ...
2
votes
3answers
1k views

How to get the parent's taxonomy?

I have 2 customs post type : "Artist" and "Concert", the "Concert" custom post type is the child of the "Artist" custom post type, the "Artist" custom post type has a "genre" taxonomy. What I'm ...
2
votes
2answers
4k views

Querying Multiple Custom Taxonomy Terms

I created a new taxonomy called 'country' and have two terms items inside it: 'USA' and 'Canada'. How do I go about querying this info? I have a filter page with two checkboxes: <input ...
4
votes
4answers
9k views

Custom Taxonomy WP_Query for All Terms in a Taxonomy?

Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy? I know this technique: $custom_taxonomy_query = new WP_Query( array( 'taxonomy_name' => ...