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.

1,453 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
1 answer
936 views

Custom Taxonomy Endpoint Pagination using paginate_links()

The Setup I have 2 taxonomies and 1 post type: Post Type: products Hierarchical Taxonomy: product_cat Nonhierarchical Taxonomy: product_type The product-category has a defined endpoint: ...
Howdy_McGee's user avatar
  • 20.6k
5 votes
1 answer
4k views

I want to load post content by categories using Ajax

I have question. I would like to load post content, custom post, depends on category. So first of all I would like to have drop down menu which will list all my categories then once user will select ...
jmysona's user avatar
  • 313
4 votes
1 answer
662 views

Custom taxonomy query for a custom post type

I have a custom post type called news with a custom taxonomy called news category. Right now I have a template called taxonomy-news_category-press.php where press is one of the news_categories. The ...
Austin's user avatar
  • 113
4 votes
1 answer
1k views

has_term or in_category for Custom Post Types

I have property as a custom post type. I want to display a specific message if the property is in the sold category. To do that, I'm using the function below: if ( has_term('sold', 'category')) { ?&...
RaajTram's user avatar
  • 159
4 votes
1 answer
98 views

Is it possible to have a taxonomy archive that lists taxonomy terms?

For example, I have a post type called foo. I can view all posts of type foo at the following url: mysite.com/foo. I then attach a taxonomy called bar, in which the terms are foobar and foobaz. I ...
Daryl's user avatar
  • 41
4 votes
1 answer
1k views

Custom taxonomy on permalink

I have a long time problem and look forward for your help. I have a custom taxonomy of "city" (it is no hierarchical like tags). I just would like my URLs to look like this: /%city%/%category%/%...
elenakoroleva's user avatar
3 votes
1 answer
866 views

Bulk 301 redirect for custom post type

I've amended the URLs for my custom post type from: url.com/jobs/job-name to url.com/jobs/job-location/job-name Problem is, because this isn't a standard rewrite wordpress doesn't do the 301 ...
Michael's user avatar
  • 31
3 votes
0 answers
2k views

Add parent/child taxonomy to custom post type url

I have seen several cases of one taxonomy being added to a custom post type url, but I have modified that function to include a parent and a child taxonomy term. However, I am getting a 404 when I go ...
Nate Beers's user avatar
3 votes
0 answers
370 views

Linking three taxonomies with ACF

I'm creating a product finder using a CPT called "Products", which is already used for displaying products separately on the site. The product finder is based on a answer and question idea, where the ...
Develon's user avatar
  • 31
3 votes
1 answer
127 views

Remove "-2" from a Toolset Types URL with the same post name

I'm using Toolset Types to create a custom post type, and within that post type there is a taxonomy. I have created two posts with the same name, but in a different taxonomy. For the purposes of ...
user avatar
3 votes
1 answer
214 views

Page to display an archive of taxonomies

My website needs to have two custom post types and each of these has two custom taxonomies with several terms each. These terms also have to be hierarchical. My problem is, that I don't know how to ...
Sam's user avatar
  • 435
3 votes
0 answers
150 views

get / list categories and counts filtered by custom taxonomy term

In my post 'post type' besides "categories" I've a custom taxonomy called "product-types". The category is actually more "manufactures" of the product types. I've a product-types page where I list ...
Mestika's user avatar
  • 770
3 votes
0 answers
2k views

Category base to url in custom post type/taxonomy

I'm building a recipe site that uses custom post types for recipes. So I searched for including the custom post type categories in the url and found a solution below by Milo. It rewrites the url and ...
Edblocker's user avatar
  • 131
3 votes
1 answer
661 views

Custom Taxonomy and tax_query Issue?

I am working on Plugin development and my plugin name is plugindev.I have a custom post type called team.I have a custom taxonomy Team_Category which is being registered by this code /****************...
raxa's user avatar
  • 610
3 votes
0 answers
58 views

How to show custom taxonomy in the permalink?

I used the Portfolio Post Type Plugin to create custom tax and post type. I would like to show the custom taxonomy on the portfolio projects. portfolio/customtaxonomy/project while now is ...
Luca's user avatar
  • 31
3 votes
0 answers
443 views

Taxonomy page lead to 404 page on pagination

I read a lot of posts here with similar problems but nothing worked for me. I have a custom taxonomy (portfolio_category) for my custom post type. I created a taxonomy template (taxonomy-...
Benmay's user avatar
  • 361
3 votes
0 answers
1k views

Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar

I have 8 custom post types (which are actually for 8 different blogs and used as "blog landing pages"). Each custom post type is also a Blog Category and each has several sub categories to it. For ...
user70922's user avatar
3 votes
1 answer
1k views

Get list of terms of current taxonomy archive for another taxonomy

I have a Custom Post Type named 'Real estate' which has (amongst others) two different taxonomies: 'Purpose' (hierarchical; terms used are 'Living', 'Working' and 'Holidays') and 'Location' (non-...
physalis's user avatar
  • 310
3 votes
1 answer
2k views

WordPress import not importing custom taxonomy

I've posted this already in the WP Support Forum hoping to have more luck here. I'm trying to import a custom post type from one blog to another. (126 posts in the custom post type). I've exported ...
user5710's user avatar
  • 315
3 votes
0 answers
463 views

How to display term description in empty terms archive?

I list all terms from a taxonomy, even the empty ones, but I found out that at least in 2010/2011 themes I got a 404-like message, the default seems to only display the term description when at least ...
Diana's user avatar
  • 1,238
3 votes
1 answer
1k views

Ajax post filter by taxonomy

I want to make a filter width more than one tanonomy width ajax and jquery, The demo i want to code is: http://gycweb.org/resources/ I have tried to code with this demo: http://dinhkk.com/demo/...
Trịnh Thế Định's user avatar
3 votes
1 answer
2k views

How do I sort posts by custom taxonomy?

I am trying to sort posts by custom taxonomy. I have a custom post type which is course-cpt and I have created custom taxonomies within it, I need to sort the courses by course-level (which is the ...
Neelam Khan's user avatar
2 votes
1 answer
33 views

Is it possible to use a post name in a custom post slug?

So I have custom post type called Lessons and I am using something like this for the slug register_post_type( 'Lessons', // CPT Options array( 'labels' => array( ...
Zarko Zivkovic's user avatar
2 votes
0 answers
192 views

Query custom post type and group by taxonomy

I struggle a bit with my piece of code - it's main goal is to show list of custom post type (called "career") childs grouped by custom taxonomy. How it should work? A user see default list ...
Julia Galden's user avatar
2 votes
0 answers
133 views

How do I get WordPress URL rewrites into Sitemap?

Consider the two following custom post types: Museums Bakeries With one shared taxonomy: Region I'm using rewrite rules to improve the URL structure, so I can serve pages to visitors such as: ...
rc_tn's user avatar
  • 21
2 votes
0 answers
421 views

Show Post Count of a Category

I've been stuck on this for a little while now, and have tried multiple ways to achieve this with no luck. I've been looking for two ways to display the total posts found on a specific, and non-...
Auromnia's user avatar
2 votes
0 answers
363 views

WP_Query search posts by custom post type and custom taxonomy

I have custom posts articles with custom taxonomy tags-articles, I need search all posts with have the term in title, or taxonomy associated with same title (or partial title): Example os published ...
rafaelfndev's user avatar
2 votes
0 answers
304 views

Limit users by custom taxonomy and user roles

This is not duplicated post! I working on the custom theme and have 2 taxonomies: bezirk and ortsgruppen. bezirk acts like main group and ortsgruppen is the sub group under bezirk. I need to asign ...
Ivijan Stefan Stipić's user avatar
2 votes
0 answers
95 views

get_queried_object error How to show post count by month in the taxonomy page

Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. Example: January 24 February 43 March 5 April 6 and etc. This code is help ful ...
Raminer's user avatar
  • 33
2 votes
0 answers
320 views

Refresh Taxonomies

When saving/updating a custom post type in the Admin Panel I'm hooking into save_post_{$post->post_type} and adding custom taxonomy terms from a linked post using wp_set_object_terms. The terms are ...
Dave Meadowcroft's user avatar
2 votes
0 answers
760 views

Getting yoast title for custom taxonomy

I have created a theme template for a custom taxonomy. The HTML title tag has the yoast title that I set when editing the taxonomy. I want to also make this the title of the page. I cant seem to ...
user1889580's user avatar
2 votes
0 answers
67 views

WordPress Custom Post types and Taxonomy relationships best practices

Given that a Custom Post Type (CPT) has properties geared towards a UI on the front end and a taxonomy is a data object which allows for easy association of a post type and a set of terms (which can ...
Marshalls Best's user avatar
2 votes
0 answers
52 views

List custom post type by custom tax term as page title

I have a page called "Developments" and I want to list all the Project posts by the custom tax Project Type using the page title as the term. This doesn't work: <?php $title_slug = ...
phi's user avatar
  • 21
2 votes
0 answers
88 views

Output the content of a term organised by each of the CPT?

I have four CPT and several shared Custom Taxonomies for all. I need to retrieve and output the content of a term (let's say "environmental-crisis" of the shared taxonomy "Crisis Type", and organise ...
Nils's user avatar
  • 43
2 votes
0 answers
44 views

Keep taxonomy base name in post permalinks

I have a custom taxonomy (I'll call 'issues' in this example) registered as such: register_taxonomy('issues',array('post', 'pieces'), array( ... 'rewrite' => array( 'slug' => 'issues', ...
Matt G's user avatar
  • 21
2 votes
0 answers
2k views

Filter custom post type archive page with custom taxonomies (categories) with AJAX

I've created a custom post type (projects) with different custom taxonomies (projects' categories). I would like to create a categories' filter but with AJAX, so without reloading the page every ...
Crashy's user avatar
  • 199
2 votes
0 answers
153 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, ...
lovestacos's user avatar
2 votes
0 answers
402 views

removing custom tax & CPT slug, adding taxonomy term in front of custom type

I am having difficulties setting up the following structure in Wordpress: site.com/custom-taxonomy-phase-term/ (taxonomy page but without the taxonomy slug) site.com/custom-taxonomy-phase-term/...
Erik van der Bas's user avatar
2 votes
1 answer
2k views

Search by type posts and taxonomy

I want that my search page give results of posts (that i want that show) and taxonomy The code to get just two type of posts: function searchfilter($query) { if ($query->is_search &&...
user133503's user avatar
2 votes
0 answers
2k views

Metabox not show in categories custom post type cmb2

it is possible to add a field in the categories (tags) in taxonomy? this is my code in functions.php function post_types(){ register_post_type('products',array( 'labels' =&...
Max's user avatar
  • 53
2 votes
0 answers
394 views

Custom taxonomy sort by term meta in admin columns

I want sorting custom taxonomy admin table with terms by terms meta. This meta is sort index of terms. But I dont know how can do it. I use add_filter('manage_edit-{}_sortable_columns') but sorting ...
Alexufo's user avatar
  • 171
2 votes
1 answer
77 views

Custom Taxonomy Creates Unwanted Integer Terms on Post Save

After I select terms and then save my custom post type, new taxonomy terms are generated with integer values and selected every time. I don't know what the problem is, nor have I found any sort of the ...
George Edward Shaw IV's user avatar
2 votes
0 answers
4k views

Add attribute / custom attribute to product in woocommerce

I have products from some API and want to insert these products. I was able to insert products and use already existing attributes ( or added by UI ). Adding new term (My Color) to the existing ...
Bilal Halayqa's user avatar
2 votes
2 answers
802 views

Outputting an array of term meta values in a custom WooCommerce tab?

Forgive me – my Wordpress/PHP skills are hilariously rudimentary, so I may not use the correct terminology. I have added a custom tab to the WooCommerce single product page and need it to display a ...
ninox boobook's user avatar
2 votes
0 answers
322 views

Order Wordpress Custom Taxonomy Pages & Pagination Not Working

I'm using this code to enable custom post types and taxonomies on my site (I've also included this below to save linking out) https://gist.github.com/kasparsd/2924900 The code works great for the ...
scottvw's user avatar
  • 21
2 votes
0 answers
81 views

Adding the taxonomy before the custom post type

I have a custom post type named landings which has a rewrite rule to change the slug to loans and a custom taxonomy provinces and I want the custom post type to have the slug of the province in the ...
Chin Leung's user avatar
2 votes
0 answers
69 views

Storing data into custom taxonomies VS post custom fields (post meta)

I'm wondering what's more efficient when it comes to performing search for data. I am building a job board where I have an option to store information like: Company Name (Searchable) City (Searchable)...
TheBigK's user avatar
  • 549
2 votes
0 answers
2k views

get_the_terms() to show all custom taxonomies

I have created three custom taxonomies that categorize my post types by project-client, project-brand, & project-medium. As of now I can use the get_the_terms() function to return only one ...
WeebleWobb's user avatar
2 votes
0 answers
3k views

multiple url slug for single custom post type

I have created a custom post type for events. Now within events post type I have created 2 categories. One is 'event' and another one is 'workshop'. The 'event' category post url looks like http://...
Prithviraj Mitra's user avatar
2 votes
1 answer
494 views

Custom post type and taxonomy permalinks - Structure

Been trying to get a nest of custom post type and taxonomy working (even took a look here) but couldn't get it working 100%. Here is the thing, I created a custom post type texturas_temp and a custom ...
Lucas Yarid's user avatar

1
2 3 4 5
30