Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [taxonomy]

A taxonomy is a generic "category" used to organize posts and custom post types

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

How to enforce a requirement for custom taxonomy

I’d like to set a custom taxonomy as required, i.e. authors must select at least one term from the taxonomy in order to save or update a post of a specified set of custom post type. If they haven't ...
Chris_Heu's user avatar
1 vote
0 answers
27 views

Having many sub-urls on the same custom taxonomy term

I have custom taxonomies, and each term has many URLs to display content like below: /custom-taxo/term-1/slug-1 /custom-taxo/term-1/slug-2 /custom-taxo/term-1/slug-3 /custom-taxo/term-2/slug-1 /...
Qiniso's user avatar
  • 111
0 votes
0 answers
16 views

Issue with WordPress Automatically Assigning Terms to Multiple Posts

Hello WordPress community, I'm encountering an issue where WordPress is automatically assigning newly created terms to multiple posts in my installation. When I create a new term (custom taxonomy: ...
Danish Mohammed's user avatar
1 vote
1 answer
18 views

Showing all posts of the current custom taxonomy on archive page

I have created a custom post (houses) and a custom taxonomy (houses_area). On each houses_area archive page, I want to see all the posts displayed by alphabetical order. I get stuck in calling the ...
Anna's user avatar
  • 21
1 vote
0 answers
17 views

One custom taxonomy with unique sets of labels for two post types?

I’m trying to use one custom taxonomy with different labels for different post types. I have the default “post” post type, and a “podcast” post type. Both post types have an associated Taxonomy with ...
fischermade's user avatar
0 votes
0 answers
8 views

WordPress Add/Edit Post right admin sidebar change title

How is it possible to change the "Tags" title on the right admin sidebar "accordion" and in the preferences of the block editor? See screenshots. I've tried changing $wp_taxonomies[...
Raf A.'s user avatar
  • 1
0 votes
1 answer
14 views

Filtering according to the locale 'de_DE'

I already have a filter to show on archive pages the terms of the taxonomy "tipologia" according to the locale = 'de_DE'. I need a similar filter to show in german the same taxonomy terms ...
Andrea Sacconi's user avatar
0 votes
1 answer
18 views

Filter on one post type with taxonimy and get other post type

I would like to fetch my posts of type 'news', 'videos', 'webinars', 'whitepapers', 'testimonials', and 'landing-pages' and apply a "filter" to only get the landing-pages type with the ...
WypSteur's user avatar
0 votes
0 answers
3 views

Show Featured products with custom taxonomy template

I have a custom taxonomy template / archive called taxonomy-brand.php and this loops fine and shows the products that have the same "brand" taxonomy, trouble is I want to have a second loop ...
user1681836's user avatar
1 vote
0 answers
13 views

When using get_terms with hide_empty = true, terms that only contain scheduled posts are not returned. How to override this?

My code is simply: $cats = get_terms( [ 'taxonomy' => 'category', ], ); Obviously, hide_empty is true by default. There's a category that only contains scheduled posts and it's not ...
William Beaumont's user avatar
0 votes
0 answers
18 views

Passing total post count to javascript

I have a ajax post loading program, I can load more post on click of a button. Problem im having is getting the button to hide or show less when no more post. I can query out the post count in PHP as ...
Beep's user avatar
  • 29
0 votes
1 answer
11 views

How reorder post tags taxonomy in the non-alphabetical custom order and save it in the Block Editor

I see that Wordpress always sorts tags in the Block Editor in the alphabetical order. How can I prevent this behaviour? I have found a good article with an approach which uses term_order field from ...
madfcat's user avatar
0 votes
1 answer
27 views

Taxonomy question how to add more data

Normally taxonomy has a name and a value in the template I'm using it has a name value and what they call category what I'm wondering is what function call in PHP do you use to set that category I ...
RichardS's user avatar
0 votes
1 answer
45 views

How to get parent and child sub category (Taxonomy) order to display

Trying to get my list of categories to display the child after the parent. For Example Parent Category Child Category child category Parent Category child category Current code <aside ...
Beep's user avatar
  • 29
0 votes
0 answers
11 views

Change taxonomy key of existing and future taxonomy posts

I registered a taxonomy with a certain key name, initial_name, and now there are hundreds of posts in a custom post type with this taxonomy selected that I don't want to lose the connection with (the ...
Joseph K.'s user avatar
  • 101
0 votes
0 answers
25 views

Taxonomy term archive claims there are no posts, but there are. How to resolve?

I have a custom post type (url), and a custom taxonomy term (url-category) for this post type. The archive page for this custom post type works fine. The taxonomy term archive claims there are no ...
MastaBaba's user avatar
  • 281
0 votes
2 answers
62 views

How to get a custom taxonomy slug in body classes

I've been trying without luck to get a custom taxonomy slug to appear as a class in the body tag of WordPress. Perhaps it has to do with the fact that I'm using a custom taxonomy rather than the build ...
Overspeed's user avatar
0 votes
0 answers
22 views

Get a custom post type's taxonomy type term names displayed as checkboxes and filter

I using this code to get all the taxonomies associated with a custom post type "newsroom" $post_type = 'newsroom'; // Get taxonomies associated with the custom post type $taxonomies = ...
Justin's user avatar
  • 101
0 votes
2 answers
103 views

Show only taxonomy types terms associated with a custom post type in WordPress PHP

I am trying to display only the taxonomy types terms selected on a custom post type "newsroom". The code below shows all taxonomy types terms for every type of post. Is there a way to show ...
Justin's user avatar
  • 101
-1 votes
1 answer
87 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
ICTDEV's user avatar
  • 133
0 votes
0 answers
40 views

Cannot set custom taxonomies when creating post

I'm migrating some posts from another source to WordPress, specifically to a theme/plugin called Madara, which has some specific taxonomies. I'm using wp_insert_post() to create the post, everything ...
Thiago Dias's user avatar
0 votes
0 answers
14 views

How to call parent and child category name in separate div?

I have created a bootstrap tab to filter the content according to parent and child category. I want to call parent and child category name in separate div because child category will work like ...
Aman Gupta's user avatar
0 votes
1 answer
36 views

Loop a Single Taxonomy and Output all Posts Associated (but also show a message for empty ones)

I have a custom post type for Vacancies, with a Taxonomy of Location set up. What I've achieved is looping through all Locations and then showing underneath associated posts. Update: Thanks to @...
AP_19's user avatar
  • 3
0 votes
0 answers
16 views

Taxonomy archives based on Custom Post Types

I have the custom post types, reception_units, year_1_units, year_2_units, year_3_units, year_4_units, year_5_units, year_6_units and resources. I want to create archives for the different post types ...
Sam's user avatar
  • 1
0 votes
1 answer
20 views

Query top level custom post in taxonomy

This is my first post, I'm a bit stuck. I have a custom post (dan) and taxonomy (dnas), with hierarchical categories. I want to make a query resulting in posts at toplevel (hoofdcategorie01, ...
Dennis's user avatar
  • 1
0 votes
0 answers
23 views

Bulk 301 redirect for Taxonomies with pagination

I'm looking for the best way to bulk redirect for modified taxonomy URLs. After category slug has been changed, I need to perform a redirect for all paginated pages: /category-old/ redirects to /...
Alexius The Coder's user avatar
0 votes
0 answers
13 views

Category display using conditions

I have a custom post type(events) created and has taxonomy(event-categories) with parent and child categories. Since im not good in coding, i will try to understand all the help from here. So what im ...
Bordzee's user avatar
0 votes
0 answers
12 views

How to display posts from home page in blogs in category wise

actually i am converting html to wordpress and i have posts on home i want to display them on blog page in category wise rightnow my blog page in working on index.php, I have made some post dynamic ...
Mujtaba's user avatar
0 votes
0 answers
14 views

Separate archive template to show posts and CPT by same category/taxonomy

I have archives for posts and another for reviews which are working fine, try as I might though I'm struggling to have a separate archive under the URL /content/[category] that pulls both posts and ...
james's user avatar
  • 1
1 vote
0 answers
43 views

How to Filter the Custom term loop based on dropdown

I had created on Custom Post Type 'resource', which has 4 taxonomies ('type', 'sector', 'industry', 'rtag') now i had added 45 posts in following manners Type - Brochure, Infographic, Research Paper, ...
Bhargav Joshi's user avatar
0 votes
0 answers
22 views

Include custom post type that matches taxonomy field in another custom post type

I have two custom post types, one is “maker” and the other “product”. (used ACF plugin) I have a taxonomy field for Business Name, this field is called “choose_business” in the product custom post ...
Nik Nak Sim's user avatar
0 votes
1 answer
23 views

Add a Permalink To a Post Title?

I'm remaking a Real Estate website for the company i work for using Wordpress along with houzez theme and elementor, The theme is using posts as properties where you can select all the property ...
Foras's user avatar
  • 1
0 votes
1 answer
110 views

Wordpress Product Page Change Label From 'Category' to 'Artist'

I would like to add a php snippet to Change Label From 'Category' to 'Artist' on wordpress product pages (alternatively throughout the whole site) I see many examples of how to remove the label, but ...
Peter M's user avatar
0 votes
0 answers
128 views

ajax select parent show child in another select and show posts in another select-ajax filter search

I'm on wordpress and I created a search filter shortcode which user can select province and show towns on another html select base on province and when user select town, in another html select it must ...
Alipvd's user avatar
  • 3
0 votes
1 answer
72 views

How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?

I have two taxonomies on my site: portfolio works and blog posts. I want blog posts under /blog and I want portfolio items under /work. I have created a page for blog posts and a page for portfolio ...
JugJoe's user avatar
  • 3
1 vote
0 answers
22 views

How to change default taxonomy for CPT only (not posts)

I am trying to change the labels of the default category and tags taxonomies for a CPT only. When trying with the code pasted below it works, but it also changes the labels for the default post type. ...
stemon's user avatar
  • 155
0 votes
0 answers
119 views

Creating a page that will dynamically get posts from 2 taxonomies

I have 2 taxonomies type and city I want to have page where it will dynamically query a city and type depending on the link for example: type/condo/city/toronto should get all my properties from ...
Bon Andre Opina's user avatar
0 votes
1 answer
46 views

How to get parent and child name in taxonomy page

I have new taxonomy "car-brand" and I want to show name of parent taxonomy in child taxonomy page. My hierarchical taxonomy: bmw -series1 --F20 --G40 -series2 --F22 --...
och's user avatar
  • 39
0 votes
1 answer
67 views

Operator 'AND' in the get_posts() function's tax_query terms not working

I am trying to get posts that are present in both the taxonomy terms. This is the code that didn't work: $args = array( 'post_type' => 'workshops', 'posts_per_page' => -1, 'fields' =...
user1448031's user avatar
0 votes
2 answers
81 views

Different templates for parent and children Taxonomy

I have new custom Taxonomy for cars list spec. I would like to know what is the best way to create a different template for parent(main) and second layer and the third layer children taxonomies. I can ...
och's user avatar
  • 39
0 votes
2 answers
27 views

Taxonomy Archive URL + Template

Working on an WP build with custom post types & taxonomies Taxonomy = Reviews Example terms = nes, snes, gamecube I've got a taxonomy archive page, taxonomy-reviews.php Going to the url /reviews/...
Jorge B's user avatar
1 vote
0 answers
33 views

How to make a term belong to multiple taxonomies?

As the title says, I’d like to implement a system where I’d like to have a term belonging to multiple taxonomies. Just in case someone’s wondering “what on earth does he need this for?”, hear me out. ...
Chakrapani Gautam's user avatar
0 votes
1 answer
352 views

How can I rename custom taxonomy if multiple custom post type have the same taxonomy name?

I have several custom post types : Testimony, questions and FAQ. They all have a taxonomy called "category". In the record function of the custom post type they all have this line: '...
blogob's user avatar
  • 137
0 votes
2 answers
725 views

Bulk import in custom taxonomy

I have a large csv file that contains a photo url and a title. I have created a custom taxonomy of my custom post type. I've made a photo field of this taxonomy with ACF and I'm looking for an option ...
bultim's user avatar
  • 1
0 votes
2 answers
289 views

How do I check if a post has a term with a particular ancestor/parent?

I'm trying to show a message on a product if the user is logged in, and the product is in the chains category, but I have assigned children/grandchildren of that term, not chains itself, and I don't ...
Martin's user avatar
  • 11
0 votes
1 answer
28 views

Taxonomy entries are spawning copies of existing entries with the new title as the existing ID, since upgrade

We recently upgraded a very old WordPress 5.x site to WordPress 6.1.1 and all seemed to go well but then it was reported that some taxonomies were generating new entries randomly. So we have a ...
Ralpharama's user avatar
0 votes
1 answer
20 views

Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2

$args = array( 'post_type' => 'product', 'meta_key' => 'sorting_weight', 'orderby' => 'meta_value_num', 'posts_per_page' => -1, 'order' => 'DESC', 'tax_query' =&...
user229880's user avatar
0 votes
0 answers
38 views

Display taxonomy terms when adding a link in the admin

When you add a link in the admin and make a research, all post types are displayed, but I wondered if there is an easy way to display also taxonomy terms. It would be very useful. Thanks!
Etienne Delcambre's user avatar
0 votes
1 answer
135 views

Trying to add taxonomy terms to search results page

I have added a custom taxonomy as "Tempo" to denote whether the songs people are searching for are Up Tempo, Mid Tempo or Slow Tempo. The search filters them properly, but I am unable to get ...
pathosmusic's user avatar
3 votes
1 answer
487 views

How to add an ACF only for parent term?

the question here is not for the front-end, it is for the back-end. Is there any way that I can add a custom field using ACF that only displays/shows in parent term. └── Category ├── Motherboard &...
agent abstract's user avatar

1
2 3 4 5
40