Questions tagged [taxonomy]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
25 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
  • 113
0 votes
0 answers
32 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
12 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
32 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
12 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
19 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
18 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
12 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
13 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
22 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
13 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
15 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
32 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
65 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
41 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
20 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
89 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
30 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
  • 29
0 votes
1 answer
49 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
52 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
  • 29
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
1 vote
0 answers
27 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
186 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
0 answers
22 views

Custom Taxonomy - Show primary first followed by rest in alphabetical order

I have a custom taxonomy and Yoast SEO installed. For a post, if I have set 3 terms from the custom taxonomy and one of them is primary, is there a way to show the primary custom taxonomy term first ...
NJT's user avatar
  • 172
0 votes
2 answers
369 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
0 answers
58 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
2 answers
137 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
0 answers
15 views

taxonomy change to post/page type

I bought a coupon theme. On my previous homepage, I used a plugin called "RATE MY POST" to "manipulate" the number of reviews. However, there are two problems with using this ...
user231321's user avatar
0 votes
0 answers
13 views

Wordpress taxonomy and terms question

what i want to do is compare orcs from the game shadow of war. I have an idea of what I need to do, but I a not sure how to use wordpress taxonomies, categories and tags. I know enough php that could ...
user230684's user avatar
0 votes
0 answers
52 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
0 answers
44 views

Add new taxonomy in WP without generate any url

I need to finding all posts that have X taxonomy with WP_Query for display position of each post in a separate section of the home page. This is my only use of this taxonomy and I don't want these ...
och's user avatar
  • 29
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
0 votes
0 answers
5 views

How to limit number of posts in the certain category and exclude the oldest post automatically

I would like to have a php code which will exclude the oldest post from the certain category of certain taxonomy if total number of posts in this category (in the time of adding a new post) greater ...
alexschneider's user avatar
0 votes
0 answers
67 views

How do I get parameters from the URL?

I have to be missing something obvious, but darn me into wool socks if I can figure out what it is. I have a set of news articles in the custom post type news. I'm trying to get an archive page ...
AWarnock's user avatar
0 votes
0 answers
71 views

Quick Edit on taxonomy names results in error

If I press Quick Edit to the terms, inside a category or taxonomy I get a 0 as a result. You can look screenshot here: // Register custom taxonomy - Marker categories. function markerCategories() { ...
dominotrix's user avatar
0 votes
0 answers
20 views

Using autocomplete with post_tag taxonomy on attachments

How do I use autocomplete on the post_tag taxonomy that I added to my attachments? Following the suggestion here, I added the post_tag taxonomy to my attachments: function dod_add_tags_to_attachments()...
kosher's user avatar
  • 260
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
34 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
89 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
0 votes
0 answers
16 views

Remove colon from CTP UI "Singular Label"

How can the colon be removed or changed from the Custom Post Type UI/Taxonomies/Singular Label? This colon shows up in my page title in Wordpress and looks like this "Recipes for: Dinner". ...
cboy's user avatar
  • 37
3 votes
1 answer
281 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 vote
0 answers
33 views

custom taxonomy not return in the code

i tried to add custom taxonomy to custom post type named "project". this is my code: function create_project_taxonomy() { register_taxonomy( 'project_cat', '...
roev's user avatar
  • 111
0 votes
0 answers
21 views

Failed to update a post when I add a taxonomy to it

I have a custom post type that has taxonomies added and when I mark a taxonomy in the block editor it does not update the post, and it automatically unmarks the marked taxonomy not allowing me to add ...
ruben_dev03's user avatar
3 votes
1 answer
140 views

How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?

I have the following SQL query: SELECT t.name FROM wp_posts p INNER JOIN wp_term_relationships tr ON tr.object_id = p.id INNER JOIN wp_terms t ON tr.term_taxonomy_id = t.term_id WHERE p.id ...
vaso123's user avatar
  • 181
4 votes
1 answer
61 views

Theme template file for a specific custom taxonomy

Is it possible to create a template file specific for a custom taxonomy? For example, I have music Custom Post Type and it has three taxonomies artist, album, and genre. So the hierarchy would be like ...
agent abstract's user avatar
0 votes
1 answer
691 views

'Unsupported Operand Types' error stemming from taxonomy re-writes with PHP 8.1

I was getting a FATAL ERROR in WordPress, but only on the front end. I KNOW the error is within my plugin, but the stack trace returns info about WP Core files, and doesn't identify where in my ...
Tony Djukic's user avatar
  • 1,958
0 votes
0 answers
59 views

Is it possible for post and custom post type to share a category base slug?

so I'm wondering if it is possible, could POST (base category) and CUSTOM POST TYPE (base category) share the same slug? Could you let me know what am I doing wrong? In fact I actually did it, both ...
agent abstract's user avatar
1 vote
0 answers
221 views

Add custom fields to Woocommerce Category Page

I want to add custom fields to Category Woocommerce items (page-products-cat); I have tried using this code but It does not work : add_action(‘product_cat_edit_form_fields’, ‘...
codingteam's user avatar
0 votes
0 answers
41 views

Custom Titles for Multiple Tag Taxonomy Page

Let me explain what I want to achieve. Normally WordPress allows "filtering" tags with multiple tags. It goes like this: https://example.com/tag/tag1+tag2 It's useful when tag1 has a lot of ...
Recofa's user avatar
  • 67

1
2 3 4 5
40