Questions tagged [advanced-taxonomy-queries]

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Search for single post by 2 tags

i have "Tag1" and "Tag2" i want to find most recent post with both tags.So far i have tried this, i know im close, but it is listing all posts containing either tag. $args = array( 'relation' ...
0
votes
0answers
14 views

Nested tax query arguments returning function is returning wrong arguments

I'm outputting the skus of products that satisfy my tax query condition where multiple tax queries are nested by "AND". here is my code $args = my_brands_loop(['brand_name'=>'mytag','shapes'=>...
0
votes
1answer
17 views

Get queried object for custom post type count

$posts = get_queried_object(); echo $posts->count; I can get post count with this code in taxonomy archive page . problem is that i can not specify post type. i just want count only A custom post ...
0
votes
1answer
34 views

list all post who have mutual taxonomy as current taxonomy!

I have app archive site with two different taxonomy type: Seller and Kind, I want to have a page for every seller and inside that page, I want to have multiple lists for every term of "Kind" taxonomy. ...
0
votes
1answer
22 views

Loop through ACF taxonomies and output associated posts

I have a page template that loops through all existing post categories and outputs 5 associated posts for each category. I want to change this so it only outputs the categories I have selected in an ...
0
votes
1answer
33 views

Why pagination is not working with tax_query param?

this is my query: $p_query = new WP_Query(array( 'post_type' => $post_type ,'post_status' => 'publish' ,'posts_per_page' => $per_page // 6 ,'paged' => $page // 2 ,'...
1
vote
1answer
21 views

How do I get a list of all categories that a given user has written blog posts for?

I need to retrieve the name of all the categories that a given user has published posts for. If I can also get a URL for the archive of that cat for that user only, this would make me very happy. How ...
0
votes
0answers
25 views

Wordpress taxonomy terms archive template help

I have custom post type Named Trips , Taxonomy > Destination , Region Activity Etc. Region Terms are , Annapurna , Everest etc. Activity Terms are trek, hiking, tours etc. I made an archive template ...
0
votes
1answer
86 views

Get url of product's images (woocommerce)

What happen when a post (product) didnt have a guid,because it has the same image with another product ? For example: Query1: select guid from wp_posts where post_type='attachment' and ...
0
votes
0answers
18 views

Permalink URL connection between two custom types

We use latest WP 5.2, and the super plugins Advanced Custom Fields Pro (ACF Pro) and CPT UI. In our website taxonomy, we need to have events, within which we have talks and workshops. Example ...
0
votes
0answers
15 views

Custom Taxonomies and Relationships

I have created a CPT named promo-codes. I have registered 2 custom taxonomies to this CPT : brand and categorie. I am using the archive page of the brand taxonomy to list all promo codes by brand ...
1
vote
2answers
44 views

Shortcode to show thumbnail and link for 3 random posts

I want to have a small header at the top of a page showing the featured images with a link to the related custom post type. This is my code: // Creates random image header within tax called(defaults ...
2
votes
1answer
46 views

get complex results set according to category structure

I need to get a complex result set from a WordPress database according to the category structure. First I will try to explain my category structure. I have three level structure as bellow. flight [...
0
votes
1answer
73 views

Custom taxonomy.php not working

I have created a custom taxonomy called "series" (code below) and two pages: taxonomy.php and a taxonomy-series.php 1)I noticed that siteurl.com/series does not work I get my 404 page, but if I were ...
0
votes
2answers
42 views

one post per term taxonomy

I need some help, again. I use this query: $tax = get_the_terms($id, 'coupon_category'); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ...
1
vote
2answers
32 views

Wordpress loop: Show only a Custom Post Type Taxononmy TERM

Before I start, I have to say that I have tried to solve my problem in a thousand different ways and I have read several posts without success. I have a CPT called "grouped", a taxonomy for that CPT ...
1
vote
1answer
589 views

WP_Query use for a filter with multiple Taxonomies and Terms

So, what I'm trying to do, is to make an ajax filter, this is the portion of the filter code that builds the $args based on the data that came from the filter form, and afterwards (not in this code) ...
1
vote
0answers
16 views

Help with Taxonomies

I have a site about London that lists a wide range of attractions. This is the current setup. I use standard post with categories for attractions, I have also create some custom taxonomies for the ...
2
votes
2answers
899 views

How can I display all post IDs from the taxonomy?

I try echo on any page (I mean page on my site) all post IDs what I have in my taxonomy. I found this: get a list of posts from Custom Taxonomy But I could not handle with it. I want to echo all ...
3
votes
1answer
5k views

Is it possible to add custom fields to a WooCommerce attribute term? [closed]

On Wordpress / WooCommerce, is it possible to add custom fields to a WooCommerce attribute term? With "attributes" I mean the general attributes and not the attributes under products. Please, check ...
0
votes
1answer
27 views

I need posts within a taxonomy category that are tagged “featured” to show up first

I need posts within a taxonomy category that are tagged “featured” to show up first https://yoga.gcclients.com/listing-category/bucks-county/ Right now it’s pulling posts from ALL posts within the ...
1
vote
1answer
29 views

Query Custom Post Type Order By Taxonomy Field

This is driving me nuts. I know it's been asked a number of times but I can't figure it out. I'm trying to display a list of WooCommerce products--which are a custom post type of 'product'. I want to ...
0
votes
1answer
201 views

Query Custom Post Type by Taxonomy Meta Value

I need to filter my custom post type "events" by Taxonomy Meta Field "city". But I can't make it work and need some help? This is what I already have. But no results... function aa_pre_get_posts($...
0
votes
1answer
60 views

Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies

Info about my setup: I have a custom post type called 'Treatments' Each treatment is categorised in to up to 3 taxonomy types - treatment categories - 'beautysalon' 'skinclicnic' 'spadays' and these ...
1
vote
1answer
31 views

Add Custom Taxonomy for Blog Meta Info

Apologies but I'm not quite sure how to title this post. When my custom taxonomies are searched nothing shows up after "Posted In" I'm not sure how to go about adding it the categories php below. ...
1
vote
0answers
1k views

add custom filters to the event calendar plugin programatically to frontend [closed]

I want to add custom filters to the filter bar of the event calendar. I have added two dropdown as categories and location programtically, when I submit the selected filters to find events, it gives ...
2
votes
0answers
71 views

How to display custom taxonomy in multiple columns?

I have a custom taxonomy (with terms that include all 50 states) that I'm displaying, along with the title of the posts in that term directly below. Simple, and it's working as expected. However, ...
0
votes
1answer
30 views

Get a Taxonomy values in an array

I have a Taxonomy type named: Products:product_cat I need the term names inside this field in an array. Is there any way to get them?
0
votes
1answer
40 views

Showing taxonomies with terms that are attached to custom post

So, I have to show the taxonomies that are present on a custom post, with their terms. I have some taxonomies (around 10) and all of them have a few terms. Eacho post can have any number of ...
0
votes
1answer
34 views

Getting all custom post taxonomies and exhibiting only part of them

I have a custom post type, that has several taxonomies. For each one, I need to show something like: Taxonomy name: Taxonomy value So, since I have posts that have the following taxonomy tree: ...
0
votes
2answers
4k views

Getting taxonomy category Image from ACF [closed]

I'm really new to php and I'm trying to get an image set using advanced custom fields on my front end. I've looked at the docs and forums but I can't get the url. All the code works but for the image. ...
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-...
1
vote
2answers
385 views

How to conditionally redirect to the post from a taxonomy page?

I would like to redirect to a post if the taxonomy term it belongs to has only one post assigned to it and so far I have this: $term_id = get_queried_object()->term_id; $taxonomy_name = '...
0
votes
2answers
2k views

Show only the sub-categories (and their content) of the current custom taxonomy with 'taxonomy.php'

So, I need to show a page with the sub-categories of the current custom taxonomy, with their respective posts inside. What I need is, when I click on a sub-cat link, I get something like: 'Tipos' (...
0
votes
2answers
616 views

Sorting taxonomy columns by meta value numeric

Slowly going crazy over trying to make taxonomy admin columns sortable by a custom field number. I have a custom taxonomy called "typer" and these taxonomies have a custom field called "prioritet". ...
0
votes
0answers
78 views

Error get_posts with Custom Taxonomy and OR relation

I've been stuck on this for hours... I did a var_dump($list_items) right before if ( $list_items ) { and it turns up empty, but a var_dump($hold_tax_query) looks (to me) like it should. if($...
0
votes
0answers
98 views

Taxonomy On Index Page

I cannot find the way to show my "taxonomy in the index", i don't know how i can display the post, not by default , if not for my taxonomy. Anyone can help me? add_filter( 'pre_get_post', '...
0
votes
0answers
190 views

Combine Tax Archive and Meta_Query in WP_Query

Is there a way to instantiate a WP_Query object—filtered by post_meta and taxonomy_meta—within the loop of which I can have access to both post and taxonomy-archive methods (like the_excerpt and ...
0
votes
0answers
33 views

Taxonomy Terms That Don't Exist Display Results

I am working on a custom post type with an archive at: https://www.bowlertransmissions.com/mmc/ If you click one of the results years, such as '2016' you will then get to a page with two buttons to ...
0
votes
1answer
127 views

How to show only tagged CPT categories / taxonomies for a custom post type?

The code below is echoing all the taxonomies available for the particular CPT. I'm calling this in a single-posttype.php to show taxonomies. What I need is to display only the taxonomies tagged to the ...
0
votes
2answers
2k views

Get taxonomy url, name, post count & image

I'm attempting to display a specific taxonomy (channel) in the archive.php page. I want to display the taxonomy's URL, name, post count, and taxonomy image. This is what I have that's working so far: ...
-1
votes
1answer
880 views

Output ACF field dynamicaly within a taxonomy loop [closed]

So I have this block that loops over my taxonomies and loads a template file to display each one of them while in it: <?php $collections = get_terms( 'resource-collection', array( 'orderby' ...
2
votes
1answer
47 views

Related Tags Concept

On search results pages I would like to show a tag list collected from other posts that are listed for the seach result. // same tag should not be listed twice And for the taxonomy pages again; tags ...
1
vote
0answers
5 views

Enable users to change change and add taxonomies of posts

I would like to enable users to add tags/categories, and to vote for tags/catergories for each post It would be a simple voting system : each user can vote for each tags (+1 / -1) and only tags that ...
0
votes
1answer
3k views

Using Advanced Custom Fields Relationship Field to select a taxonomy term

I have a site where I've got a post type called 'small banners' which are basically adverts that i need to call on normal pages (This is fine, I've done this) but I also need to use this functionality ...
-1
votes
1answer
941 views

Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode

I'm using Toolset Views to display a list of taxonomies. These taxonomies are under a custom Taxonomy that I created with Toolset Taxonomies. I then used the plugin Taxonomy Images to add the option ...
0
votes
1answer
132 views

How to replace hard-coded list of custom taxonomy terms based on custom field query [closed]

I am currently hard-coding custom taxonomy terms "13329,5555" into a block of code. Instead of hard-coding the custom taxonomy product_cat term_id as "13329,5555" how would I dynamically replace 13329,...
0
votes
1answer
185 views

In Product Category archives how to show Posts having same/similar prod_cat slug structure?

I will be writing Posts about each of Product's Product Categories (product_cat on products) and I am choosing to group (associate) Posts by the product_cat hierarchical taxonomy. To do this without ...
0
votes
1answer
27 views

Make relation of custom taxomies

Need to make a relation of two different custom taxomonies. Example: Sport category with subcategory basketball. Just like that I have team and player taxonomy. I am looking for linking a player with ...
0
votes
1answer
368 views

Return an array from get_terms and store as JavaScript array for search autocomplete

I am trying to use wp_list_pluck to return an array of taxonomy names from get_terms. I'm not sure what I'm doing wrong, but this only echo's out "Array": $terms = get_terms(array( 'taxonomy' ...