Questions tagged [advanced-taxonomy-queries]

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

How can I change the canonical URL of an Ajax-created taxonomy URL in wordpress?

I use wordpress with woocommerce and have URLs like this (hiding the domain name since the site is not ready yet): /filter/product_tag=computer-accessories/ however, it has a canonical tag of my ...
0
votes
0answers
14 views

ACF relationship field group by taxonomy

How i can use ACF relationship filed to show output group by taxonomies. For example: I have post type "courses" with taxonomies "Undergraduate" & "Postgraduate". If ...
0
votes
0answers
17 views

Show only posts without format in admin screen

The situation In admin screen (edit.php?post_type=post) using format selection dropdown adds a URL parameter like post_format=video. This makes the query to only look for posts with post-format-...
0
votes
1answer
11 views

How to get_term_meta on single custom post?

I added custom image and icon to my custom taxonomy, and I know how to display it in the front end in the taxonomy template page. $headImageId = get_term_meta( get_queried_object_id(), 'category-...
0
votes
0answers
19 views

Get taxonomy terms used in posts that have second taxonomy with specific term

I'm not sure I know how to phrase this question best, so please bear with me. I have a custom post type (artworks) which has two custom taxonomies attached (artist eg. name, and media eg. painting ...
0
votes
0answers
22 views

Create Post Query to order by a Taxonomy custom meta field

I have a standard WP_Query to search for Posts of a certain Custom Post Type. I am trying to extend this by filtering by a specific custom meta field that was set for a Taxonomy that is attached to ...
0
votes
0answers
44 views

wp_query with meta_query and tax_query

I am trying to find a way to combine a meta_query and a term_query and i got confused with the research. $sport = 'basket'; $args_p = array( 'posts_per_page' => 10,...
0
votes
0answers
10 views

CPT UI Relations Between Taxonomies

I'm using "CPT UI" to create a post type, I have created a post type and Four Taxonomies (Country - City - Area - Neighborhood). Required functionality: First I Added the countries in the "Country ...
0
votes
0answers
31 views

Related posts ordered by taxonomy

On my single post page, I display 4 related posts based on 3 custom taxonomies products, artists, and product-category. Everything works fine with the code below. BUT: Right now, with this code, the ...
2
votes
1answer
50 views

Get image of latest post from taxonomies/categories

I have a custom post type "Artworks" with a custom taxonomy "Artists". I have a page where I list all the entries from the "Artists" taxonomy (Artist 1, Artist 2, Artist 3, etc.). How can I get the ...
0
votes
0answers
19 views

List specific field of specific taxonomy

I have a custom post type "artwork". Every "artwork"-post has custom fields that are connected to taxonomies: "Artist" (Who's the designer), "Movie" (which movie the artwork is for), and "Agency" (the ...
0
votes
1answer
38 views

Custom Taxonomies Archive Page 404

I used the "Custom Post Types UI" and "Custom Fields" plug-ins to set up my structure. I have a custom post type called "artwork". This works fine. Posts have URLs like domain.cc/artwork/title-of-...
0
votes
0answers
16 views

Wordpress filter Query custom post type by two taxonomies

I got one custom post(vendor), and two taxonomies(city, discipline). the logic was built under ACF(Advanced Custom Fields) I want to query them by city and discipline this is the structure I struggle ...
0
votes
1answer
93 views

Display Custom Field or Custom Taxonomy in front page /post/product

I added some custom field and taxonomy in post /page/product main like Type, Channels, Battery etc.I created with custom post type UI plugin & ACF plugin but it is not showing in frontend of post ...
0
votes
0answers
68 views

Setting a custom post type default category(taxonomy term) using parameters

I multiple custom post types and I would like to set a default category that can be set from one function through parameters. I initially did this for one custom post type and was hardcoded but I ...
0
votes
1answer
21 views

WP_Query not using custom taxonomy categories on custom post type

So I have both a custom post type which is called 'Recipes' in my register method() as shown below: public static function register() { add_action('init', function() { $labels = array( ...
0
votes
0answers
26 views

Filter taxonomies by repeater field, placeholder issue

as the title of the post, I’ve to filter a custom taxonomy by custom fields created with Advanced Custom Field (ACF), and I’ve no problems for all the fields except the repeater. This is my code $...
1
vote
0answers
24 views

Taxonomies on custom taxonomies

I have a custom post type with multiple custom taxonomies. I need those taxonomies to have a relationship as well. The trick is, I need a child to be able to have multiple parents. I understand that ...
0
votes
1answer
21 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
1answer
188 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
62 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
1k 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
266 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
2answers
38 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
30 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 ...
2
votes
3answers
9k 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
37 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 ...
1
vote
2answers
155 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
55 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
364 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
70 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
59 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 ...
2
votes
1answer
1k 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
17 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
1answer
1k 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
10k 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
28 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
68 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
333 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
83 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
46 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
2k 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
114 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
39 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
43 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
38 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
6k 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
92 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
648 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' (...