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,455
questions with no upvoted or accepted answers
10
votes
1
answer
965
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:
...
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 ...
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 ...
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')) {
?&...
4
votes
1
answer
104
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 ...
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%/%...
3
votes
1
answer
892
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 ...
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 ...
3
votes
0
answers
378
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 ...
3
votes
1
answer
132
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 ...
3
votes
1
answer
215
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 ...
3
votes
0
answers
153
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 ...
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 ...
3
votes
1
answer
713
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
/****************...
3
votes
0
answers
59
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
...
3
votes
0
answers
445
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-...
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 ...
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-...
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 ...
3
votes
0
answers
480
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 ...
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/...
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 ...
2
votes
1
answer
40
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(
...
2
votes
0
answers
212
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 ...
2
votes
0
answers
157
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:
...
2
votes
0
answers
559
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-...
2
votes
0
answers
405
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 ...
2
votes
0
answers
310
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 ...
2
votes
0
answers
96
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 ...
2
votes
0
answers
349
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 ...
2
votes
0
answers
804
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 ...
2
votes
0
answers
71
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 ...
2
votes
0
answers
53
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 = ...
2
votes
0
answers
89
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 ...
2
votes
0
answers
1k
views
Displaying custom taxonomy on WooCommerce product page
I'm trying to create a WooCommerce bookshop for a client, and need to create a custom taxonomy for the books' authors. I've managed to get the taxonomy working in wp-admin by inserting the following ...
2
votes
0
answers
45
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', ...
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 ...
2
votes
0
answers
158
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, ...
2
votes
0
answers
403
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/...
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' =&...
2
votes
0
answers
404
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 ...
2
votes
1
answer
78
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 ...
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 ...
2
votes
2
answers
815
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 ...
2
votes
0
answers
323
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 ...
2
votes
0
answers
82
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 ...
2
votes
0
answers
70
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)...
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 ...
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://...
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 ...