Questions tagged [custom-taxonomy]

Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

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

How to show sub-taxonomies based on selected parent-taxonomy

I have have a custom post type: "cars" for car spec and its taxonomy "cars-brand" Because the number of taxonomies and sub-taxonomies is very large, it is difficult to choose it in ...
och's user avatar
  • 39
2 votes
1 answer
121 views

Show the terms of the hierarchical taxonomy

I'm trying to display buttons with category term names. i am using this code which works to show terms of categories which without hierarchy, but i can't figure out how to adjust it for hierarchical ...
LesCa's user avatar
  • 21
1 vote
0 answers
21 views

Introducing sub categories into the URL

I have inherited a pretty dated project, and it contains a lot of legacy code, which I am still fumbling around in. Currently I have a custom post type with the URL: /something/faqs/{topic}/{faq-post},...
ChrisBratherton's user avatar
0 votes
1 answer
35 views

How to add capability to author role to assign custom taxonomy terms to a custom post type?

my question title says it all. I am not sure if I should approach this by adding a capability to the author role or adding a capabilities array when I register the custom post type or even when I ...
Kropotkin's user avatar
  • 169
0 votes
1 answer
59 views

Custom Post Type Taxonomy Select dropdown list

I've created a select dropdown list of terms from a CPT taxonomy. This works fine. Here is my code <label for="films">Films</label> <select name="films" id="...
alexkodr's user avatar
  • 101
0 votes
1 answer
147 views

Post term block variations not generated for custom taxonomies

Since Gutenberg 13.3 (and WP 6.1), a post term block variation is generated for each custom taxonomy registered. For example, if you register a “Product category” taxonomy, you should able to add a “...
leemon's user avatar
  • 1,848
0 votes
0 answers
54 views

Showing Parent, Grandparent as dynamic select options in Child Custom post type

I have 5 post types in a hierarchial order i.e., Department > Journal > Volume > Issue > Article. I am looking to pop Parent and grand parent select fields dynamically in a child post type ...
Vijay's user avatar
  • 1
0 votes
1 answer
291 views

Remove prefix from custom post type archive page <h1>

What is the proper way to remove the taxonomy prefix from the archive page <title> AND <h1> for custom post types? I've read a lot of documentation that cites how to remove the (prefix?) ...
Mike Ciffone's user avatar
0 votes
1 answer
45 views

List all posts in hierarchy and groupped by each taxonomy

i need some helps to list all my posts from my custom post type in hierarchy structure (like wp_list_pages) and groupped by each Taxonomy. i've tried to use wp_list_pages() but i don't know how to ...
Dewa Alit's user avatar
0 votes
2 answers
26 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
0 votes
1 answer
41 views

Show taxonomy term meta field on single template

I have a custom taxonomy that has a metadata field with an image url. On the post type single template I have the below php and I need it to echo the meta field but it remains blank. I tried several ...
Biels's user avatar
  • 113
0 votes
1 answer
151 views

Hook function when taxonomy terms change

I have a custom post type with a custom taxonomy. When the custom taxonomy is set to "bar", I want to disable comments with: wp_update_post(array( 'ID' => $post->ID, '...
dtw's user avatar
  • 105
0 votes
0 answers
75 views

How to use custom post type and taxonomy for car specs in wp

I am planning to develop a new car specification website. I want to create a new type post for single page car specs. But I need guidance for the structure of taxonomies. First there is the Brands ...
och's user avatar
  • 39
0 votes
0 answers
19 views

I need a permalink post_type structure with taxonomy slug in it for location landing pages and service pages

I am building a Wordpress site that has landing pages for locations in the UK. Each location needs sub pages to represent a service relevant to that location. To do this, I have set up service pages ...
itsthatseoguy's user avatar
1 vote
2 answers
111 views

Two taxonomies with the same slug

There is a custom post type "real estate" with the slug "sale" and 2 taxonomies city and property type. It is necessary that taxes are displayed refer to the same slug, that is ...
aprinciple's user avatar
0 votes
0 answers
15 views

How to show posts with at least two categories (in admin)

I have a custom post type "cus_type" and and custom taxonomy (category) "cus_category", so that a cus_type can have one or more categories. In the post list in the admin (edit.php) ...
remy's user avatar
  • 1
0 votes
0 answers
20 views

how putting a "null position" in a taxonomy dropdown selector

what have I to add to this code to have a "null position" or "no selection"? At the moment even if I dont choose a value, after I press the edit button, the system gets the default ...
Andrea Sacconi's user avatar
0 votes
0 answers
88 views

How to boost WP custom post REST API GET queries by custom taxonomies

Let's say you have a custom post type custom_type registered in your main plugin file. You also have multiple custom taxonomies registered in your main plugin file. All in all something like this: ...
DevelJoe's user avatar
  • 487
0 votes
0 answers
26 views

Replace post author in header by custom taxonomy

I'm managing a website for a printed magazine, which publishes some of it's best or most relevant articles on their website, like this one: https://dewekker.com/tweetal/4-mei-wees-erbij. This website ...
Prodefu's user avatar
0 votes
0 answers
21 views

How to add categories to a custom post type using wp_insert_post($new_post);

I have a custom post type 'memberfile', and a function for users (members) to upload files. Uploaded files are automatically posted as a 'memberfile' post in the backend. In the form for uploading the ...
Bart's user avatar
  • 1
0 votes
0 answers
16 views

An script/Plugin for automatic page creation per term

My site is such that it introduces the devices and displays their specifications (something like WooCommerce but without the ability to buy), I have 2 Post-Types named "Devices" and "...
x3BLIND8x's user avatar
0 votes
0 answers
27 views

Modify permalink of CPT archive to support two taxonomies

there are hundreds of questions like these but some outdated and some are just bloated with code, hope I can make things simple. CPT Slug: resources Taxonomy Slug: language Taxonomy Slug: program I ...
csaborio's user avatar
  • 112
0 votes
0 answers
45 views

Admin user get message higher level of permission to edit taxonomy

i can't edit taxonomy even i created wp-admin/edit-tags.php?taxonomy=portfolio-filter&post_type=portfolio message show
yass bs's user avatar
0 votes
0 answers
66 views

Add text in custom taxonomy

I created a custom taxonomy on my WordPress website (for WooCommerce products). There is an editor on the edit page of this taxonomy. The data entered into this editor is displayed at the top of the ...
sizdah's user avatar
  • 3
0 votes
1 answer
70 views

Optional taxonomy in cpt permalink

I found a ton of articles / or third party plugins that make it possible to add a taxonomy in a cpt permalink, this works fine. But I can’t find anything on how to handle cpt permalinks if no taxonomy ...
tijmen's user avatar
  • 25
0 votes
2 answers
208 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
2 answers
577 views

Permalinks for Custom Post Types and Taxonomies

I've been trying to figure out how to achieve a particular permalink structure to no avail. Here's the situation: On my site, I have one main custom taxonomy (module). I have five custom post types (...
mburtis's user avatar
0 votes
0 answers
17 views

How to develop Knowledge center in WordPress Website

I need to develop Knowledge Center Concept in my Website, where I can Publish Blog Posts, Case Studies, Customer Success Stories, Info-graphics & Whitepapers etc. How can i develop such concept in ...
Bhargav Joshi's user avatar
0 votes
2 answers
120 views

Template hierarchy html with taxonomy in 6.2

Following the doc: for a single post wpress 6.2 loads single.html ( and if none index.html) ok. If we follow hierarchy diagram, a post with specific taxonomy XX will be : single-XX.html ( ie single-{...
pirela's user avatar
  • 101
0 votes
0 answers
129 views

post_type_link not working for posts without terms

I'm using following .php code for changing the permalink structure of my cpt "hilfe" to /cpt_slug/term_slug/post_link/ function change_taxonomy_slug( $args, $taxonomy ) { /*item post ...
mrmoon97's user avatar
0 votes
1 answer
40 views

Have Custom Taxonomy Slug Fall Under Custom Post Type Slug

Currently scratching my head as to how to get this to work. I have registered a custom post type "guide", and have a custom taxonomy for the post type of "venue-type". I am trying ...
James Simpson's user avatar
0 votes
2 answers
54 views

wp_add_object_terms cant recognize a post ID

i'm facing a weird problem. I have a cutom post type 'cpt_dates' with a taxonomy 'cpt_dates_postIDs'. I need to save as a taxonomy term an ID of another post (from another CPT, freshly inserted with $...
nico's user avatar
  • 25
0 votes
1 answer
95 views

Modify Term List in Custom Taxonomy Meta Box

For the life of me, I can't find the hook for altering the list of terms in a custom taxonomy metabox. On the post-edit screen, instead of list of custom taxonomy terms like this... [ ] Bob Dylan [ ] ...
Michael Rexman's user avatar
0 votes
0 answers
35 views

I'm trying to get posts under a custom taxonomy but I don't know what I'm doing wrong here

Im using the following php. and I'm only trying to call titles at the moment. I have 4 posts under this taxonomy. <?php $shopPosts = array( 'post_type' => array( ...
Philly's user avatar
  • 3
0 votes
2 answers
71 views

WP Query - Can't get posts with specific taxonomy

I can't get my custom posts with a specific taxonomy. Here is my code in functions.php : function portalp_custom_post_type_realisations() { $labels = array( 'name' => ...
Jérémie's user avatar
0 votes
1 answer
57 views

Adding Taxonomies to Custom Post Type Without Displaying Blog Post Categories

I am running into an issue that I am trying to fix. I first needed to find a way to add a category page to custom post type. Which I was able to do with this following code added to the mu-plugin file....
Rookie Recruits's user avatar
0 votes
0 answers
33 views

Create a WordPress loop that shows posts from a custom post type + filters the posts by taxonomies while hiding empty taxonomies

I am working on a page template for a custom post type where I need to only show posts that are tagged for a certain sport in a custom taxonomy. I am also displaying all posts that are tagged to that ...
Ashley Stanley's user avatar
0 votes
0 answers
169 views

Why my archive title isn't showing?

I' have a strange problem (well, maybe stupid, but I'm too burned out). My archive pages don't show titles when they' are for a taxonomy. This only happens in the archives for a custom taxonomy. The ...
Devin's user avatar
  • 298
0 votes
0 answers
170 views

Creating a custom archive page for WooCommerce products based on tags

I'm looking for some help in creating a custom archive page for my WooCommerce products. Currently, my products are assigned to different categories and some are linked to a event (custom taxonomy). ...
Jelle Tempelman's user avatar
0 votes
0 answers
65 views

Best approach of implementing multi-select/checkboxes for taxonomies?

I am working on modifying how multi-select is done in a list in a custom wordpress plugin instead of using the default method of holding ctrl and clicking. The point of the plugin is to be able to ...
Mance Rah's user avatar
0 votes
0 answers
61 views

Child terms with improper parent in the url should redirect to 404

I have post categories created in the below hierarchy: {Category Name}({Category Slug}) Category1 (category1) -SubCategory (subcategory) Category2 (category2) -SubCategory (subcategory-category2) Two ...
dhirenpatel22's user avatar
0 votes
1 answer
25 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
1 vote
0 answers
169 views

Custom Taxonomy in custom REST API search

I am building my first theme where I use a custom search and I would like to include the ability to search by custom taxonomy. Currently, the taxonomy term shows up in Postman but no posts with that ...
Charalambos's user avatar
0 votes
0 answers
28 views

Cannot attach custom taxonomy term to a custom post type. Post taxonomy terms are not saving

I have a custom post type with five different custom taxonomies attached to it. Of those 5, I am unable to add taxonomy terms to posts. However, the other four taxonomies are saving just fine! Here is ...
Subrata Sarkar's user avatar
0 votes
1 answer
85 views

Dynamically count the number of custom post types associated to a custom taxonomy

I have two custom post types, "participants" and "reports". Both of them are associated with the custom taxonomy "year". So in the post "report 1" that is ...
Adriano Marques's user avatar
0 votes
1 answer
66 views

How to automatically compare date from custom post type with current date and change taxonomy based on a result?

I have a local WordPress website installment. I have custom post type "tours" and a custom taxonomy connected to it called "active-past". This taxonomy has two terms "active1&...
Trombolo's user avatar
0 votes
1 answer
173 views

How to make multiple custom taxonomies sit under custom post type slug?

I have a custom post type called resources which has been registered as so: register_post_type( 'Resources', theme_build_post_args( // $slug, $singular, $plural 'resources', 'Resource', '...
Freddy's user avatar
  • 147
2 votes
1 answer
105 views

Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)

I have a weight class category, where I want to sort by weight so Heavyweight shows at the top, and Flyweight at the bottom. I have created a custom meta field called 'weight' where I store an int ...
Mac Cooper's user avatar
1 vote
2 answers
927 views

Custom Sort Order for Custom Post Type Taxonomy

I have a custom post type - Demo Tours And for that CPT I created a Custom Taxonomy - Demo Tour Categories. Each Demo Tour may have one or more category. Each category has Custom Field - Category ...
strangedenial's user avatar
0 votes
0 answers
186 views

Hide empty categories on widget

I excluded some products from woocommerce_product_query with this code: function en_archive_products_by_rol( $query ) { if (is_admin()) { return; } $meta_query = (...
Elianalu's user avatar

1
2
3 4 5
89