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
10 votes
2 answers
9k views

Read-only taxonomy (user can assign term but can't create or edit existing terms)

I'm creating a custom taxonomy whose terms must remain fixed by all users. Once I've set up the starting set of terms, I want them to be immutable. I also don't want to clutter up the Admin UI with ...
Tom Auger's user avatar
  • 7,046
10 votes
2 answers
7k views

How to prevent new terms being added to a custom taxonomy?

I've created some custom taxonomies using register_taxonomy, but I want to prevent new terms from being added. I noticed that there is a 'capabilities' argument available in register_taxonomy, is that ...
Osu's user avatar
  • 1,442
10 votes
1 answer
977 views

Efficient Taxonomy Intersection

I have many uses for this but I want to know the most performant way of doing what is going to be an expensive operation. As an example I will use a shop. Given: A product brand taxonomy A product ...
Tom J Nowell's user avatar
  • 59.2k
10 votes
1 answer
6k views

custom taxonomy and pages rewrite slug conflict gives 404

I'm using the Custom Post Type UI plugin to create my custom taxonomies. I have a portfolio that is made up of projects (custom post type) with 2 custom taxonomies of technologies and clients. The ...
user avatar
9 votes
2 answers
24k views

Wordpress tax_query "and" operator not functioning as desired

I have a custom post type of image with a custom taxonomy called image_tag (it's hierarchical like categories). Here are some examples of the tags that might be used: Structure (id: 25) - House (id: ...
dkeeling's user avatar
  • 319
9 votes
1 answer
9k views

Adding Category/Tag/Taxonomy Support to Images/Media

I've been trying to add category, tag, or custom taxonomy support to images (or all media, though I'm only concerned with Images). I've got it part-way figured out with: add_action('init', '...
Roxanne Ready's user avatar
9 votes
3 answers
9k views

Can you add the visual editor to the description field for custom taxonomies?

Can you add the visual editor to the description field for custom taxonomies? It would be nice to have this option available when you edit an entry for a taxonomy be it core or custom.
hsatterwhite's user avatar
8 votes
3 answers
9k views

Custom columns on edit-tags.php main page

I am trying to add custom columns to edit-tags.php for a custom taxonomy that I have created. This custom taxonomy is called equipment-types and it only applies to one custom post type called ...
IV4's user avatar
  • 83
8 votes
1 answer
5k views

Can't custom taxonomies have same terms (slugs) as categories?

I knew that it's not possible to have same terms (term slugs) under categories and tags, but surprisingly, as I realized today, that's the case with custom taxonomies as well. So for instance, if my ...
its_me's user avatar
  • 4,511
8 votes
2 answers
13k views

Show posts without term

I am working on a product page where I show reviews from my post type 'reviews', if the product page title matches with my term from the taxonomy 'review-product'. Example. Product page title: ...
Robbert's user avatar
  • 1,255
8 votes
2 answers
4k views

Filtering a custom post type by custom taxonomy in archive template

I've seen this question posted in different forms before, but most of those solutions are centered around the admin interface, and I haven't found any answers that apply to the front end. I've got a ...
ken.dunnington's user avatar
8 votes
4 answers
62k views

Loop through custom taxonomies and display posts

While I've been able to get this working for normal WP categories I've been unable to get it working for custom taxonomies. I'd like to loop through each custom taxonomy (categories in my case) and ...
curtismchale's user avatar
  • 2,599
8 votes
2 answers
22k views

Custom Post type & Taxonomy URL structure

I have a custom post type products and a custom taxonomy 'Product Categories' with the slug products. My goal: I'm trying to create a URL structure like so: Product Post Type Archive: products/ ...
J Robz's user avatar
  • 175
8 votes
1 answer
5k views

How to share category taxonomy with custom post type (The Event Calendar plugin)

I have a custom post type 'Events' created by The Event Calendar plugin. It has registered it's own custom taxonomy. Is there a way I can assign the regular WP post categories to some of these events ...
Chris's user avatar
  • 111
7 votes
6 answers
62k views

get term archive url / link

I created custom post types & custom taxonomies for these. Example: actors (taxonomy) for movies (post type). Now I want to show up in my widget some terms and a more link for the actors terms ...
e382df99a7950919789725ceeec126's user avatar
7 votes
2 answers
5k views

WordPress database error: [Not unique table/alias: 'wp_postmeta']

Someone very kindly helped me out on another question, which has now lead to this problem of two functions causing a database error. From what I've read it could have something to do with LEFT JOIN ...
Randomer11's user avatar
7 votes
3 answers
27k views

Why is my working Custom Taxonomy not in get_taxonomies array?

I've created a custom taxonomy. It's working just as expected, aside from it is not showing in the get_taxonomies array. get_terms function returns an invalid taxonomy error. I want to use get_terms ...
Jeff Sebring's user avatar
7 votes
3 answers
8k views

What are the differences between custom post type and custom page templates?

What is the difference between custom taxonomies and page templates and custom post types? I think I understand that taxonomy is used to organize data. CPTs are used to give your data a different ...
Steve Fischer's user avatar
7 votes
3 answers
38k views

Create a shortcode to display custom post types with a specific taxonomy

I created a page template to list all products of a specific product line. Now I want to list all posts from this custom post type (products) based on the taxonomy described in the shortcode for each ...
Luan's user avatar
  • 183
6 votes
2 answers
2k views

Is there a way to 'Lock' a Taxonomy?

I was wondering if there was a way to prevent the addition of new categories into a taxonomy, essentially 'locking' the taxonomy. I'm programatically registering a taxonomy and filling it with terms ...
Drew Gourley's user avatar
  • 1,943
6 votes
1 answer
10k views

Custom Post Types not showing on Custom Taxonomy archive page

I've been working with custom post types for a little while now, but yesterday I took my first stab at a custom taxonomy to pair with them. Here is my 'company' taxonomy: function ...
jkd540's user avatar
  • 75
6 votes
2 answers
4k views

Can custom taxonomies be displayed inside of a custom meta box?

I'm currently displaying custom taxonomies in a drop down menu. Each taxonomy has its own little wrapper in the sidebar. Is it possible to move the taxonomy to inside of my custom write box for ease-...
MTT's user avatar
  • 3,546
6 votes
4 answers
15k views

Hide the term description on the term edit page, for a given taxonomy

I have written some long descriptions for a custom category taxonomy. I don't want to remove them, I just want to hide it from the management page: /wp-admin/term.php?taxonomy=custom_category I ...
user1889580's user avatar
6 votes
3 answers
9k views

Combining Multiple Taxonomies in one URL

I'm creating a complex site with a product catalog with two custom taxonomies. They are Brands and Types. Brands - Canon - Toshiba - HP Types - Printers - Scanners - Multifunction I need a page ...
JacobTheDev's user avatar
  • 1,221
6 votes
1 answer
6k views

How can I rewrite URLs to pass taxonomy and post type values to the query?

So I have a site with about 6 custom post types.Three of these post types are attached to a single custom taxonomy. I would like to be able to list_cats in the sidebar and spit out a url like ../%...
jroakes's user avatar
  • 201
6 votes
1 answer
10k views

How to assign multiple roles for capabilities array withini register_taxonomy function?

I am not sure how to add multiple capabilities to 'assign_terms' capability. My code is below, notice the capabilities array within the register_taxonomy function /* Registers taxonomies. */ ...
Michael Sablatura's user avatar
6 votes
1 answer
12k views

Custom Taxonomy as Dropdown in admin

I’ve created a custom post type (called Sponsors) with an additional taxonomy connected to it, called “Type”. Everything is essentially working perfectly but I would very much like to have my ...
Mestika's user avatar
  • 770
6 votes
1 answer
36k views

How to list custom taxonomy categories?

I have a custom post type (CPT) which contains products, and a taxonomy that contains product terms. I need to display these terms on the page 'Products' and when clicked on a certain term, it needs ...
oksite's user avatar
  • 63
6 votes
7 answers
38k views

How to get current term in my custom taxonomy in WordPress?

I need to display the current term in my custom taxonomy in a single post. example: My custom taxonomy is products and term of them is product-1, product-2 and products-3. My post is assigned to ...
user avatar
5 votes
1 answer
6k views

Pagination throws 404 error on custom taxonomy archive pages

I have created a custom taxonomy for a custom post type called "portfolio" like so: function jvs_portfolio_categories_init() { register_taxonomy( 'project-category', 'portfolio', ...
Javier Villanueva's user avatar
5 votes
2 answers
3k views

WP_List_Table Inside Metabox Not Working on Submit

I'm trying to display a WP_List_table inside a metabox. The metabox is for a custom taxonomy called service which is registered to a custom post type called office. The table columns contain input ...
Ben's user avatar
  • 195
5 votes
1 answer
648 views

custom post type and custom taxonomy permalink

I have 2 pages. /client-a/ /client-b/ I have a custom post type, called "case": $case_type = array( 'labels' => $case_labels, 'public' => true, 'publicly_queryable' => true, ...
Homem Robô's user avatar
5 votes
1 answer
8k views

Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)

OK, so i'm messing with Custom Taxonomies for the second time and in both instances i've run into this problem where using the posts_per_page argument in either a query_posts or WP_query scenario.. ...
J. Millington's user avatar
5 votes
1 answer
3k views

Sort Custom Post Type Archive by Taxonomy Term [duplicate]

What is the best method (as of 3.1 or 3.2 beta) to sort a custom post type archive by a given taxonomy term? I'm trying to make a staff page and I want to sort employees by department. So the ...
MTT's user avatar
  • 3,546
5 votes
1 answer
786 views

Programatically inserting terms doesn't update the Taxonomy admin UI

On one of the projects I'm working on, we have a feed which is being aggregated into WordPress. The feed items are being assigned ot a custom post type and a custom taxonomy. New terms are created ...
Tom J Nowell's user avatar
  • 59.2k
5 votes
3 answers
8k views

get_terms does not return any results for my custom taxonomy?

If I go to wp-admin/edit-tags.php?taxonomy=location then I correctly see a list of terms. If I loop through: get_terms("category"); Then I correctly see several terms for the taxonomy of category. ...
KevinUK's user avatar
  • 341
5 votes
1 answer
7k views

restrict_manage_posts not working in 3.3.1

I have noticed my custom taxonomy filters no longer work in the 3.3.1 admin as per these methods: Adding a Taxonomy Filter to Admin List for a Custom Post Type? I also discovered that to filter a ...
Niels's user avatar
  • 524
5 votes
4 answers
10k views

$wp_query->queried_object->ID throws warning: Undefined property

<?php $current_term = $wp_query->queried_object->name; $current_term_id = $wp_query->queried_object->ID; ?> <hgroup class="section-heading wrapper"> <h1><...
mathiregister's user avatar
5 votes
4 answers
6k views

Wordpress Search - display taxonomy terms in results

I have a custom post type of Hotel. Hotels can be can be categorised with the taxonomy Resort. On my search page I need to be able to list hotels and taxonomy terms in the results, as separate ...
Xav's user avatar
  • 399
4 votes
2 answers
7k views

How to get the singular name of a custom taxonomy?

I have got something like this: $taxonomies = get_object_taxonomies('my_post_type'); foreach($taxonomies as $tax){ $args['labels'] = get_taxonomy_labels( (object) $args ); $args['label'] = $...
Lore's user avatar
  • 43
4 votes
2 answers
24k views

Using URL parameters, list posts from category and custom taxonomy

For example, http://example.com/?cat=6&tag=books lists posts that belong to category ID 6 and tagged 'books' (i.e. posts that satisfy both conditions). Similarly, http://example.com/feed/?cat=6&...
its_me's user avatar
  • 4,511
4 votes
6 answers
20k views

Custom order of terms for custom taxonomy in admin and website

I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
dashaluna's user avatar
  • 2,072
4 votes
3 answers
2k views

Display posts the match taxonomy term linked from wp_list_categoies?

This should be simple, but it escapes me. I have a custom post type and a custom taxonomy. The taxonomy is named "asset_type" and the slug is "type" I am using wp_list_categories to provide a ...
Steve's user avatar
  • 293
4 votes
2 answers
15k views

Why does a custom post type need the ''hierarchical' args setting?

I'm struggling with understanding some things about CPTs and and could do with some help. I can see that taxonomies often need to be hierarchical, but can't see how/when a custom post type would be? ...
Mere Development's user avatar
4 votes
2 answers
2k views

Modify Term Update Redirection

Whenever I update a term it currently redirects me back to the edit-tags.php page for that taxonomy, the term list. Is it possible to instead of redirects to the term list to instead bring me back to ...
Howdy_McGee's user avatar
  • 20.6k
4 votes
1 answer
3k views

Changing the priority of a custom taxonomy's metabox

I'm creating a new custom taxonomy (not a custom post type). On the edit post page, this custom taxonomy is showing up above all of my other meta boxes. I'd like it to sink down lower in the group. ...
rinogo's user avatar
  • 1,441
4 votes
5 answers
9k views

Custom taxonomy - custom sortable column

I've created custom taxonomy called 'cities' where you can add cities and added custom field ( radio button ) with 2 options: 'Yes' and 'No' ( never mind what that is ). Everythins is ok, I can get ...
mihajlo's user avatar
  • 61
4 votes
2 answers
44k views

query multiple taxonomies

I have a function set up to show 'Similar Products', i.e. showing products that share the same products-category taxonomy term. This works great but I want to narrow the function even further and make ...
user1374796's user avatar
4 votes
2 answers
798 views

Front End Post Save Child terms

Im trying to update my front end post form which allows me to save my custom taxonomy parent term, but now I need to save the child term that's selected. NHB is for Neighborhood which are child terms ...
730wavy's user avatar
  • 193
4 votes
2 answers
8k views

RSS Feed for posts containing any term from a taxonomy

I imagine the answer to this will be related to this question I asked yesterday: Custom Taxonomy WP_Query for All Terms in a Taxonomy? I would like to output an RSS feed containing all posts that ...
Dave Morris's user avatar

1 2 3
4
5
9