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
1 answer
260 views

Custom endpoint filtering post by custom taxonomies

I am trying to create a custom endpoint by custom taxonomies, I have already created another for the categories and it works well, however there is something I cannot solve with this function ...
0 votes
1 answer
62 views

Set two terms for a post when they differ only by an accent

I face the following situation: after manually adding (in the backend) the terms with names (not slugs) Mânie and Manie, that differs only in an accent/diacritic (they are totally different words with ...
  • 1,101
0 votes
0 answers
117 views

Unknown column 'wp_posts.ID' in 'field list

I'm getting WordPress database error: [Unknown column 'wp_posts.ID' in 'field list'], but column does exist, can someone please tell me what I'm doing wrong? SELECT * FROM wp_posts WHERE ID IN( ...
  • 146
0 votes
1 answer
81 views

filter for thumbnail not working for custom taxonomy term

I am using a hook to change the appearance of categories on my website. my problem is, it works fine for product categories but when i decided to use a custom taxonomy for the purpose, they are ...
0 votes
1 answer
66 views

Custom Taxonomy terms with latest post ordered by date pagination issue

I'm using the similar code from this question, order terms by post date works only if I display all the terms on the page, example terms_to_display = 99999, but if I set it to 6 or for example, the ...
  • 146
1 vote
0 answers
26 views

custom taxonamy and post type

I have a little problem with showing of my taxonomy template my codes to create custom post type are: function setup_projects_cpt(){ $labels = array( 'name' => esc_html_x('Projects',...
0 votes
1 answer
209 views

how to get this tax_query working?

I have wp_query including custom taxonomy terms which works if all the fields have values. Otherwise, it is giving 0 results. This is the form that is used to get the taxonomy terms. Based on the ...
0 votes
0 answers
16 views

Custom taxonomies registered via plugin stop existing after function finishes running

I'm writing a plugin that retrieves information via an API and registers it as a term in a custom taxonomy. But as soon as the script finishes running, the taxonomy doesn't exist anymore, and it gets ...
1 vote
1 answer
257 views

Create multiple rewrite endpoints for custom taxonomy archive

I am trying to create custom end point for the custom taxonomy - 'species' I am trying to use urls like https://example.com/dogs/shop/ https://example.com/cats/shop/ https://example.com/dogs/services/...
0 votes
0 answers
48 views

Display just the Post's parent Category, not child

I want to display all post under a parent category (custom taxonomy) ONLY!. Here's what I've done so far:' <?php $args_1 = array( 'fields' => 'ids', ); $custom_taxterms = ...
0 votes
1 answer
86 views

Can't fetch Custom Post Type Data through Custom Query

I have a custom taxonomy "Shade Type" which contains two types Ready Mix DCM I am querying the DCM value to display in WooCommerce tab. My code is fine but I am not getting any values in ...
0 votes
0 answers
54 views

Custom front-end form for adding post - Category problem

I've created a CPT front-end form for post-adding. It has a title, description, categories, image, and a couple of custom fields connected with ACF in the backend. Everything is working, except ...
0 votes
1 answer
34 views

Add a class to a div if custom post type has specific terms?

For example: if the post has the terms 'movies' or 'tv' I would like to add a class of "on" to a div in the post. <div class="box [added class here]" </div>
0 votes
1 answer
81 views

How to show a custom taxonomy in the theme?

I have created a custom post type: register_post_type() and custom taxonomy: register_taxonomy(), but when trying to show the categories made to the post type in the theme single-{post_type}.php they ...
0 votes
2 answers
97 views

i want to send email to user when the custom taxonomy is changed

Hello every one i am new to wordpress development. i am working on a plugin in which i have created a custom post type with the name of application when the user submits a form from the frontend a ...
0 votes
1 answer
27 views

Should I use a custom taxonomy or custom post type for grouping a list of panels associated with a group of tests?

I am struggling to word this correctly, but we have a list of laboratory blood tests listed: Comprehensive Blood Panel Basic Blood Panel Liver Blood Panel Cholesterol Panel and many many more These ...
0 votes
1 answer
269 views

Custom Taxonomy Search result page

I have a post type named Icons, I have a custom taxonomy named Icons Pack which have a custom field for featured image. Also I have a search form in my site for users to search for the icons they want ...
0 votes
0 answers
43 views

Display acf taxonomy attachment

On wordpress, using ACF I've added a taxonomy field to the attachment to all images. I now want to display the taxonomy field in the html 'id="the-taxonomy">'. My main goal is using it as ...
0 votes
1 answer
109 views

Custom Permalink For Custom Post Type - Working Fine But Broken For Pagination

I'm having an issue with pagination not working while trying to get custom post type permalink. I've Custom post type 'songs' and custom taxonomy 'singer' here: example.com/songs/ // ...
  • 1
0 votes
1 answer
26 views

set object terms after some some time of published post - functions.php

I have to change the published post in one category to another category after some days. I have created the below code for the function, which I have added in the functions.php file in child-theme. ...
  • 13
0 votes
1 answer
274 views

How to filter custom taxonomy term name, slug, and description?

I have a few people working on a website with me, and they need to create custom taxonomy terms using a very simple set of rules; however, they do not seem to understand how to do it. So, I'm trying ...
  • 281
0 votes
1 answer
256 views

How to hide a child category and show his parent category

i have the following schematic: the world - Cover the world. The country -Covered the country. theater - theater cover. etc... And I want that when I ...
0 votes
1 answer
27 views

Display custom taxanomy on woocommere product page

have added a new taxonomy called "collection" to Woocommerce with the code below. I want to insert this new taxonomy between the Category and Tags labels that appear on a single product page....
0 votes
1 answer
29 views

optimal taxonomy or custom post types

hi everyone on this community, i've been researching this but everytime i think i'm getting somewhere, i hit a dead end and have to start again; so i thought i'd reach out to this community for some ...
0 votes
0 answers
23 views

Where to find relation of custom post type category with it thubmnail image in wordpress database

Actually i have installed a theme and that has custom post type with categories. I have created categories and searched in database that are being inserted into terms and taxonomy tables. And ...
0 votes
1 answer
407 views

How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query

I need to get the term of each post while running WP Query. I tried this inside the loop $term = $loop->get_queried_object(); echo $term->name; but I am still getting custom Post Type ...
  • 515
0 votes
1 answer
17 views

How can I show links for custom posts group by taxonomy current term and sub-term?

I tried to display post with links by sub term and group thouse posts and sub terms by parent terms. For example: Parent term 1 Parent term 1 Term 1 Post1 Post2 Post3 Term 2 Post4 Post5 Parent ...
0 votes
1 answer
36 views

Wp_insert_term doesn't work from separate file with custom taxonomy

I have code that works good in main plugin file: if ( ! class_exists( 'Id_CRM_Contacts_User_Cpt' ) ) { class Id_CRM_Contacts_User_Cpt { function __construct() { register_activation_hook( ...
  • 5
0 votes
1 answer
113 views

Main query disturb pre_get_post by category query

I've an archive page with custom post sorted by a custom field. I have two buttons that apply a filter by custom category. The result is not as desired. The correct number of results comes out, but ...
0 votes
1 answer
36 views

Get the taxonomy value in the post loop inside the archive page

sorry for my noob code but it feels close to what I am trying to achieve. I need help on displaying the taxonomy values inside the archive post loop. I have a custom post type called "plays" ...
  • 1
0 votes
1 answer
121 views

Display a list of random terms from custom taxonomy with shortcode

I try to output a list of terms from my custom taxonomy. I am almost sure I was using this code snippet before, but somehow WP throws errors: shuffle() expects parameter 1 to be array array_slice() ...
0 votes
1 answer
330 views

How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields

I try to make a sort of fiter for my website. Goal is for the visitors to query results by prices ('prix') and hobbies ('aimerparlapersonne'). Prices are numbers between min and max. Hobbies is ...
1 vote
0 answers
14 views

Taxonomy custom post type URL

I have created a custom post of type "job". I created taxonomies. I would like the urls to be done like this. examplesite.com/job/categorie/page because for the moment in the url there is ...
  • 13
0 votes
1 answer
67 views

Custom taxonomy does not display in custom post loop

So I think I might be going mad or something. I have a custom post type (arkiv) with two custom taxonomies (genre and author) and I try to list the posts on a template page within a loop and display ...
0 votes
1 answer
112 views

Archive page URL for custom taxonomy and post type

I created a custom post type and custom taxonomy. I can access archive page for this custom post type, showing all entries for this type, but I am unable to get url for a specific taxonomy term. When ...
1 vote
0 answers
49 views

One Specific Category To Permalink

I have a Wordpress site that has been up and running for some years using the custom permalink structure of: /%postname%/ This is fine, except I want to launch a special section in which posts go in a ...
0 votes
1 answer
33 views

List of post categories only associated to another custom taxonomy

I've got a custom taxonomy "sector" associated to posts; posts are assigned to the default categories as well. What I'd like to achieve is to show in a custom sidebar a list of "...
0 votes
1 answer
102 views

Adding term to a custom taxonomy based on term from product category

spent over four hours on this and still hitting a wall, hope StackExchange knows better. :/ Basically, I have some Woo products and whenever a new product is added, its name should be saved as a term ...
  • 13
1 vote
0 answers
22 views

Get number of post who belongs in two taxonomies!

I need a way to figure this in the image! I have two taxonomies (Band, City) in my custom post type and I need in my custom archive page to have all the posts who belong in each taxonomy! Is there a ...
1 vote
1 answer
56 views

custom permalinks based on taxonomies for custom post type

I have products for which I want permalinks as following https://example.com/product/manufacturer/brand/model i.e https://example.com/product/manufacturer-1/brand-1/model-11 https://example.com/...
0 votes
0 answers
150 views

Create loop from selected terms in ACF taxonomy field

This feels like an easy question but I just cannot get it to work. I have a basic custom post loop displaying posts based on a taxonomy of location and can then manually change the terms to show posts ...
1 vote
1 answer
605 views

Custom Post Type - Display Categories & Tags In Dashboard list

I have a custom post type of business. When viewing the business list from the dashboard, I would like the categories and tags for the business to be displayed just like with typical posts (see ...
0 votes
0 answers
20 views

Filter taxonomy by CPT

I have the following code that shows all the categories within the "category" taxonomy, it works perfectly but I need to filter so that it shows only the categories of a certain type of CPT ...
1 vote
0 answers
41 views

Display as tree terms of taxonomy and custom posts for each term of taxonomy

I have cpt "Document" and Taxonomy Document categories with terms "AML" and "Corporate Governance". For each term there are children "EU", "National Law&...
0 votes
1 answer
64 views

What's the name of the custom post type yearly archive template?

I know there's a name for every kind of template. archive-CPT.php, or single-CPT even taxonomies taxonomy-taxonomyname.php but, what's the name I should use for the template that have my yearly ...
0 votes
2 answers
61 views

Does using custom taxonomy is more CPU efficient than using meta_data?

Ok, I hope I won't get downvoted for this being not a coding question, but I think this will benefit all who want to make their Wordpress projects more CPU efficient. Basically on the other questions ...
  • 203
0 votes
1 answer
68 views

Sort custom posts by date and then by taxonomy

i am having this issues for month and i can't figure out how to solve this one: I am working on a website, where you can check out cultural events in my region. This is just to let you know of what i'...
0 votes
1 answer
63 views

Custom Permalinks For CPT and pages with parent. Advanced Wordpress

So, I've created a CPT - Community Post: https://pastebin.com/9XSrvZAr For this CPT I've created two custom taxonomies: https://pastebin.com/fNhfpiM6 community_post_domain community_post_type My goal ...
  • 101
0 votes
1 answer
35 views

List taxonomy terms assigned to a post in hierarchical view

Been trying do this and still no luck. What I'm trying is to list taxonomy terms assigned to a post ordered by parent-child category relationship (hierarchical view). Structure is something like this ...
0 votes
1 answer
8 views

Tracking the name of a custom taxonomy

For a site I need to show related posts for a custom taxonomy. Because another person build this site and also created a custom taxonomy, and this code can't be found in a proper file like functions....

1
3 4
5
6 7
89