When I wrote about custom taxonomies just a year ago, not much was known or understood about them in the WordPress community. For most people, anything beyond “tags” and “categories” was unneeded anyway. And, only having only taxonomies for blog posts was essentially useless.
However, with WordPress 3.0 around the corner and the introduction of custom post types, the usefulness of custom taxonomies will increase greatly.
Post types are your forms of content. Taxonomies are the glue that holds that content together, linking it in all kinds of neat ways.
As I delve deeper into the subject of post types and taxonomies in this series of posts, I’ll give more examples of how these two things are related and how they can be used to create any type of site you want with WordPress.
First, we need a primer on taxonomies.
In WordPress 3.0, taxonomies will be super-charged. While I do encourage you to go back and read my original post on custom taxonomies and my followup on how I created a movie database to gain a better understanding of taxonomies, I’ll try to cover the important details in this post.
A refresher on what taxonomies are
Taxonomies are a method for grouping content. They’re a way of intelligently creating an organizational system for data. Some examples include:
- Finding actors (taxonomy) that have played in specific movies (content).
- Listing musicians (taxonomy) that have performed on various albums (content).
- Locating restaurants (content) that serve specific types of food (taxonomy).
- Getting recipes (content) that use certain ingredients (taxonomy).
- Searching for jobs (content) in different fields (taxonomy).
- Visiting a forum (taxonomy) that lists forum topics (content).
- Scanning for books (content) written by your favorite author (taxonomy).
Grouping content in this way simply isn’t possible with standard tags and categories. To understand the benefits of taxonomies, you have to open your mind to possibilities beyond a standard blog.
What’s new with taxonomies in 3.0?
Some things have changed since the major overhaul in WordPress 2.8 of taxonomies. Don’t worry; your previously-created taxonomies will still work fine. But, now you have much more control.
The biggest changes are:
- Ability to create taxonomies for any post type (not just posts).
- Hierarchical taxonomies now get admin screens just like non-hierarchical ones.
- Control over the capabilities for editing, creating, deleting, and assigning terms.
- Control over admin text for making the UI not seem so weird.
The register_taxonomy function
To register a taxonomy, we must use the register_taxonomy() WordPress function. It takes in three parameters.
register_taxonomy( $taxonomy, $objects, $arguments )
$taxonomy
The $taxonomy parameter should be a unique name for your taxonomy that’s not used by any other taxonomy.
register_taxonomy( 'division', $objects, $arguments )
$objects
The $objects parameter can be a string (single object type) or an array (multiple object types). This represents the post types that you want to register your taxonomy for.
register_taxonomy( $taxonomy, array( 'post', 'page' ), $arguments )
$arguments
The $arguments parameter is an array of arguments that help define how your taxonomy should function. I’ll cover these in more depth later.
register_taxonomy( $taxonomy, $objects, array() )
Creating a custom taxonomy
We’re going to keep everything pretty basic for this tutorial. Let’s create a taxonomy called division for your blog posts. The easiest way to do this is to add this code to your theme’s functions.php file or a plugin file.
add_action( 'init', 'register_my_taxonomies', 0 );
function register_my_taxonomies() {
register_taxonomy(
'division',
array( 'post' ),
array(
'public' => true,
'labels' => array(
'name' => __( 'Divisions' ),
'singular_name' => __( 'Division' )
),
)
);
}
This will create a new item called “Divisions” for you under your “Posts” menu item in the admin.

Controlling your taxonomy
The arguments array (third parameter) of register_taxonomy() is the parameter that gives you fine-grain control over how your taxonomy functions in WordPress. It allows for about 10 arguments, which I’ll cover in detail here. In each section, I’ll give a basic code example of how each is used.
public
The public argument is sort of a catchall argument that controls whether your taxonomy is publicly used on the site or if works behind the scenes. Depending on whether it’s set to true or false, it’ll automatically set other arguments if they aren’t defined.
show_ui: Whether the taxonomy should be shown in the administration interface.show_tagcloud: Whether to allow the taxonomy to be chosen in the tag cloud widget.show_in_nav_menus: Whether to allow terms from the taxonomy in navigation menus.
'public' => true,
'show_ui' => true,
'show_tagcloud' => true,
'show_in_nav_menus' => true,
hierarchical
The hierarchical argument decides if your taxonomy’s terms are in a non-hierarchical (flat) or hierarchical format. By default, this is set to false, so the taxonomy will behave like the post tag taxonomy. Hierarchical taxonomies will behave like the category taxonomy.
'hierarchical' => false,
capabilities
New in WordPress 3.0 is the ability to change the capabilities for who can use the taxonomy in the admin. By default, users of roles with the manage_categories capability can manage, edit, and delete terms, and those of roles with the edit_posts capability can assign terms to a “post.”
manage_terms: Ability to view terms in the administration. I don’t see any other use for this.edit_terms: Grants the ability to edit and create terms.delete_terms: Gives permission to delete terms from the taxonomy.assign_terms: Capability for assigning terms in the new/edit post screen.
If you’re using a role management plugin like Members, you can assign which users have control over your terms. If not, I suggest not changing these capabilities.
'capabilities' => array(
'manage_terms' => 'manage_divisions',
'edit_terms' => 'edit_divisions',
'delete_terms' => 'delete_divisions',
'assign_terms' => 'assign_divisions'
),
labels
The labels array is a set of text strings that control how your taxonomy is viewed in the admin. If your taxonomy is non-hierarchical, this defaults to the post tag wording. If it is hierarchical, it defaults to the category terminology.
name: The plural name that represents your taxonomy.singular_name: The singular name for your taxonomy.search_items: Text for the search button when searching the taxonomy terms.popular_items: Header for the popular cloud of terms (not used with hierarchical taxonomies).all_items: Text to display all of the terms of the taxonomy.parent_item: Text for displaying the parent term (not used with non-hierarchical taxonomies).parent_item_colon: Text for displaying the parent term followed by a colon (not used with non-hierarchical taxonomies).edit_item: Represents the text when editing a term.update_item: Displayed when updating a term.add_new_item: Text to display for adding a new term.new_item_name: Text to display for adding a new term name.
'labels' => array(
'name' => __( 'Divisions' ),
'singular_name' => __( 'Division' ),
'search_items' => __( 'Search Divisions' ),
'popular_items' => __( 'Popular Divisions' ),
'all_items' => __( 'All Divisions' ),
'parent_item' => __( 'Parent Division' ),
'parent_item_colon' => __( 'Parent Division:' ),
'edit_item' => __( 'Edit Divison' ),
'update_item' => __( 'Update Division' ),
'add_new_item' => __( 'Add New Division' ),
'new_item_name' => __( 'New Division Name' ),
),
query_var
The query_var argument allows you to get posts based on particular terms of the taxonomy through a query string in the browser URL bar or through a WordPress function like query_posts() or class like WP_Query. This will default to the name of your taxonomy, but you can also set it to false to prevent queries.
'query_var' => 'division',
rewrite
The rewrite argument gives you control over the permalink structure of your taxonomy’s term archives. You may want a structure like yoursite.com/divisions/blue-group, and this argument will give you control over that. It can be set to true, false, or an array of values. The values of the array are:
slug: The slug you want to prefix your term archives with.with_front: Whether your term archives should use the front base from your permalinks settings.
'rewrite' => array( 'slug' => 'divisions', 'with_front' => false ),
update_count_callback
update_count_callback allows you to write a custom function that will be called when the term count is updated. Most users shouldn’t need this and shouldn’t bother setting this.
'update_count_callback' => 'my_custom_count_callback',
To answer the 18 billion questions from the last year
Since I first published an article on taxonomies last year, I’ve gotten numerous questions on using them. The two questions that crop up the most:
- Can I create a hierarchical taxonomy like categories?
- Can I use my taxonomy with pages (or other post types)?
It’s been a long time coming, but I can finally say, “Yes! And. Yes!”
I didn’t want to overwhelm everyone with too much information in this tutorial. I mostly wanted to give a refresher on taxonomies and cover some of the new features. I encourage you to read my previous posts on the subject for a deeper understanding of taxonomies.
The problem I see now is that there’s one more question that needs answering — how to merge taxonomies and post types. I’ve touched on this a bit in this post, but you can expect a real-world example from me in the near future.
I’ve been very interested in custom taxonomies, since your original articles about a year ago (referred to at the top of this article)
I’ve had some fun making a little database website, similar to your own ‘movie database’ demo, maybe one day that will see the light of day as a serious website… but for now my main interest in custom taxonomies is how can i apply them to my main website
I’d like to split up my original ‘tags cloud’ into specific topics rather than just a random collection of unrelated terms
However this is where Wordpress core falls down…. There seems to be no way to change the relationship of old tags that already exist in my mysql database, from the original tag cloud into the new custom taxonomies
I tried asking for help over on WP support forums, but no-one has any solution
http://wordpress.org/support/topic/406956?replies=7
It seems this is going to need to solved by a plugin before these custom taxonomies become of any use to WP users with older already established websites
Still, this is great news for people starting brand new websites from scratch
Thanks for the update….I have been hoping for this. I used your movie database tutorial on several client projects and will do the same with this one as well. Theme Hybrid+Custom Tax=Client Love!
This should go straight into the Codex! Just like Ade, I’ve been interested in taxonomies/custom post types/content types for quite some time now. This post update couldn’t have come at a better time as I was just working on a new website yesterday and creating custom post types for it.
I installed a couple of plugins (Custom Post Type UI, CMS Press, etc.) to begin creating the new post types. Since this was the first chance I’ve had to use WP3.0 & post types, I went with the plugins vs. coding by hand (which with you post, I feel more confident about).
I see the benefits of coding by hand, since you’ll have total control over the content types. What I seem to be missing is where I can use and benefit from using the content types within the WP3.0 admin area.
For example, I started using the new WP menu system, and while it’s awesome to be able to select from Pages + Categories, it didn’t seem to recognize that I have taxonomies & content types of my own. Did they skip this type of connection or am I just not seeing how to link them? At that point, it seems like I would be better off just using Categories since the rest of the system recognizes them.
So, after testing the custom post type plugins I mentioned vs. hand-coding like Justin details, the hand-coded method *does* allow custom post types & taxonomies to appear in the new WP3.0 built-in menu system.
Thanks for this, Justin. Couldn’t be more timely, as I just was Googling for info on this and came to your original article but needed more info. Perfect!
I have a question for you: how would I call custom taxonomies from a nav menu? In other words, if I had Category A (or Custom Taxonomy A) and a sub-menu item of Custom Taxonomy X, how would I call them in a nav menu so that I could either go to posts in Cat A, or a listing of posts that are ONLY in BOTH Cat A and Tax X. Make sense?
The nav menu would look like this:
Category A (links to all posts in Cat A)
- Custom Taxonomy X (links to all posts in Cat A with Tax X assigned)
Thanks in advance for your guidance and much appreciate your hard work in putting these detailed explanations together!
Three more labels for you: http://core.trac.wordpress.org/changeset/15190
This must be a fantastic event plugin from your hand
I think a event-plugin would be fantastic in combining the two.
For instance for music-events we would have:
Concert/Band: Custom post type
Musician: Custom taxonomy
Venue: Custom taxonomy
Price range: Custom taxonomy
Genre: Custom taxonomy
Where to buy tickets: Custom taxonomy
For a theater event we would have:
Play: Custom post type
Actors: Custom taxonomy
Director: Custom taxonomy
Theater/place: Custom taxonomy (but probably another one)
This would also combine great with your members plugin. And then we would just need a great search plugin to utilize the power of this segmentation
All we would miss from this kind of event plugin would be time and Google maps integration. But that could be handled with custom fields for the first and another plugin for the later
This is a very timely article indeed! A new era is indeed coming for taxonomies.
Since you’re doing this refresher, I thought it might be a good place to ask if you have any insight on displaying a list of hierarchical taxonomy terms related to a specific post on the single post template? I’ve been going nuts with this.
We can use the wp_list_categories function to list terms of a taxonomy in a nice hierarchical fashion with links … but, their is no way to pass it a post-id in order to only retrieve the terms of the current post.
We can use the get_terms_list function in order to pass a post-id, but, then we have no way to maintain the hierarchy and have to manually code it.
I’m sure as many others begin to take full advantage of these new capabilities, this will become a major hurdle, as it is for me at the moment, so, hoping someone can give some insight?
It would be great to see a wp_list_terms function that would take a post-id filter, list hierarchically or not, link to term archive etc. in the future.
Anyone who finds themselves in the same head banging dilemma I was in of how to actually show the hierarchical structure of your custom hierarchical taxonomy terms as they relate to a single post, Scribu has come to the rescue with a great explanation of how to accomplish this. Check it out here: http://scribu.net/wordpress/extending-the-category-walker.html#comment-3776
That was a great article on custom taxonomies. I have been using them for a while and I love the. If people aren’t using them they need to be because they work.
I am amazed you got the refresher. Your information blows the codex away. In a way, it does show how much of a blog CMS Wordpress is and how much publishing and meta-development has yet to converge. Most people who needs these particular taxonomies will learn how to use php to their advantage and find better solutions with making their own plugins, or will defer to developers who will not use Wordpress.
But, there is a good crowd of people who like the convenience of the system and the backend. Giving your tutorial has given hope to those who want to make Wordpress better. I hope an API page is made soon. I might take a run at after I get use to all the functions it has to offer.
Hey Justin,
Thanks for all of the great posts. I’ve been reading through them all day. I have one thing that I can’t seem to get working an was hoping you might be able to help me with. When I create a taxonomy.php page I copied the content from categories.php and then added the following under
Then in order to display my taxonomy list I use:
For the life of me I cant seem to get this to work. The output is always blank after “Posts classified under:”. I feel like i must be doing something wrong with
get_term_by.This has been evading me all day, any help would be greatly appreciated.
Troy
Replace: $term_name
With: $term->name
Hey Justin,
Sorry I forgot to add part of my original comment, this one is hopefully complete.
Thanks for all of the great posts. I’ve been reading through them all day. I have one thing that I can’t seem to get working an was hoping you might be able to help me with. When I create a
taxonomy.phppage I copied the content fromcategories.phpand then added the following under get_header.Then in order to display my taxonomy list I use:
For the life of me I cant seem to get this to work. The output is always blank after “Posts classified under:”. I feel like i must be doing something wrong with
get_term_by.This has been evading me all day, any help would be greatly appreciated.
Troy
I had the same issue as you and used the following to finally get it to work.
Great article. But I don’t know why I couldn’t do it. I make a mistake somwhere.
You sir, are a life saver.
I’m not looking forward to reworking all of my code to take advantage of WP 3.0 taxonomies, especially hierarchies, but it’s going to be worth it when it’s all done.
I have problem with permalink rewrite,
look at this page (http://weblifes.com/category/taxonom/),
here I tried Taxonomy all work fine.
The structure of permalink is ok, but all the post direct the latest post(single post) of “custom_post_type”.
the url structure is different but all page is refer to most recent post.
sorry for my english.
On a theme I am working on I have created a custom taxonomy called ‘genre’. I have terms like scifi, Comedy, Drama , action etc, under this ‘genre’ taxonomy.
I am trying to make a custom taxonomy selection option in my theme option page so that I can query post with any specific term in that custom taxonomy. I have been trying to get this done using the get_terms function.
The code I am using for it is this,
$zm_terms_obj = get_terms(‘genre’) ;//genre is the name of my custom taxonomy
$zm_terms = array();
foreach ($zm_terms_obj as $zm_term) {
$zm_terms[$zm_term->term_id]=$zm_term->name;
}
$terms_tmp = array_unshift( $zm_terms, “Select a genre:”);
and for select option
array( “name” => “Movie Genre”,
“desc” => “”,
“id” => $shortname.”_mgenre”,
“std” => “Select a genre:”,
“type” => “select”,
“options” => $zm_terms),
Now when I go to the theme option page and try to select a genre it is supposed to list options like scifi, comedy, drama, action. But I find the select field blank. No terms are listed. Has anyone else tried this? any suggestion?
Thanks for the great articles.
I’m trying to solve what I would think would be a pretty common issue for artists/bands who are using WP and need to display an extensive discography on their site.
The new custom content types and taxonomies features in 3.0 seem like they will go along ways towards doing this. I’ve made some progress setting up a possible solution, but I keep having the feeling I’m re-inventing the wheel here and that someone else must have already done this.
I’ve seen the old ‘Discography’ plugin, but it isn’t quite there in my opinion. Is there anyone else out there working on something similar?
how to display all post with custom taxonomy,
i’ve ‘music’ taxonomy, music has 2 sub/cat, ‘rock’ and ‘jazz’..etc
for now i can display with ‘rock’ and ‘jazz’, etc (all sub/cat of this music taxonomy)
but i dont know how to display all post with this ‘music’ taxonomy.
anyone know about this?
Why would you want to do that? Do you query posts who all have ‘tags’?
I think it’s best to make a post-type music.
I’m trying to figure out the same thing but with bars and restaurants. In my case, I have a food and drink category that lists all bars and restaurants and I’m using taxonomies break those down into specifics.
Similar to what you are facing, I have a ‘cuisine’ taxonomy for different food styles (American/Chinese etc…) and it’s not a problem to get a list of all Chinese or American restaurants but I’m stuck figuring out how to get a list of everything that falls under ‘cuisine’ taxonomy.
I can solve this using additional categories but it’s not an ideal solution.
Thanks for this!
Is it possible to redirect taxonomies? I have dynamic php pages that I use for each game on my football site and would like to create taxonomies that will link directly to that game’s page instead of an archive page. Is there something built into wordpress that can pull this off?
wow, great info here on taxonomies, im going to try them out on our company recently upgraded wordpress 3.0 blog and will let you know of our finding. thanks.
For me as a novice blogger, your article was very interesting, optimization tool, the well itself shows.
Thanks for the article Justin. I’ve been using taxonomies since my last project, a Portuguese website dedicated to Online Gaming and MMOs. I use Taxonomies to classify posts as Guides, Articles, News, Videos. I use Categories for the Games, World of Warcraft, Starcraft, etc. I use Tags as tags are used, for specific subjects.
Taxonomies are great, they allow me to organize my website better.
But there is something I’m having trouble with since 2.9 and I don’t think it’s fixed on 3.0. It’s the is_tax() function. I wanted to use it so if the current page is a taxonomie, similar to is_category() so I would put that specific Title on that page.
The problem is that I think that function is returning false when it should return true.
For example, if you go to this page: http://massivo.net/type/artigo/ That is a taxonomy Artigo of Post Type (slug: type). I used this on the archive page:
Artigos
But it doesn’t return true so I don’t have a title for that page. Anyway know a way around this?
I don’t think the code rendered well… Sorry for that.
(...) elseif( is_tax('artigo') ) {ArtigosIs there any way of setting “default” selected custom taxonomies?
Is there any way of doing this programatically based on data passed through?
In the most abstract of examples:
I have a custom taxonomy (SLEEPY) with options called DAY and NIGHT.
Is there a way of setting a function call on the loading of the meta box so that I can dynamically set these as default as needed?
Thanks
Great article on the ‘hard to get my head around’ topic of taxonomies in general and WordPress Taxonomies.
I am still not clear on content and taxonomy classification.
With a mortgage site example where you have:
Funders of Mortgages:
E.g. Banks, securitised lenders and private funders as sources of mortgage finance,
Mortgage Distribution models.
Banks [with up to 8 different channels for distribution of mortgage products, e.g, bank branches, online direct, mobile direct, franchised partners, financial planners, and mortgage brokers ]
Securitised lenders: [Some of which are bank owned]
Direct, Wholesale, introducers, mortgage managers, mortgage brokers or variations or omissions on these channels. e.g. Some only direct, some only through mortgage brokers, some only through mortgage managers.
Mortgage loan types split several ways e.g.:
Revolving credit lines,
Interest only
Variable Principal and interest
Mixtures of these
Loan Pricing models
Basic discount
Introductory discounts [ e.g. special rate for 3, 6 or 12 months, or fixed rate for 3 years then reverts to variable rate]
professional packages and bundled packages
Loan size discounts e.g [over $300,000 get a better rate for life]
Which are the taxonomy and which are the content in these areas ?
I can’t wait to upgrade my blog site to 3.0… there are just way too many things I can’t do with 2.0, and a lot of things just take way too long!
I was having a bear of a problem with empty taxonomies breaking the page.
I looked around a bit and realized I had to add a check to see if the taxonomy exists:
Unfortunately the documentation on custom taxonomies mostly fail to address this problem.
Oh crap. Why can’t we post code here? Here’s the link to my snippet:
http://cloudislands.com/samples/snip-2.txt
With Taxonomies we can create unlimited possibilities with WordPress
Your earlier posts worked perfectly for creating custom taxonomies in WP2.9 and I agree witht he comment that this article should go into the codex.
Kate
I’m hooked on Wordpress :3 <33
Thanks for the articles!
I’ve been using your articles and a few others to help me piece together some fairly good functionality for a website I’m working on. BUT I’ve run into a problem.
I’m using the taxonomies as hierarchical and I’ve made this work with the wordpress menu. I’ll have several layers of menu options, but when I click on a parent which has no items in it I get nothing found, but would like to show the children’s posts. If this makes any sense…
Example: website.com/catalog/nascar <– shows nothing found
website.com/catalog/nascar/dale <— shows all the dale items.
Example: I would like website.com/catalog/nascar to show all children items.
Children Examples: website.com/catalog/nascar/team-caliber/
website.com/catalog/nascar/dale
Thank you any help would be appreciated.
-Brad
When you add custom taxonmies for custom posttypes, and then display taxonomy information using filters and actions on the ‘manage_posts_custom_column’ ‘manage_edit-portfolio_columns’ hooks on the admin/edit.php pages they are not searchable.
Only select dropboxes only let you sort/filter by month.
Any ideas how to get this going? Kind of sad to have the power of taxonomies, but with out the ability to sort through them, when you have 100 attached posts, and your listings for each taxonomy grows it become a big management problem. Just putting it out there for disscussion…
Justin,
First of all, thanks for your articles, they’re very enlightening.
Is it possible to assign custom taxonomies to user profiles like you do with posts, pages or custom post types? The goal is to show filtered members’ lists according to the tags/categories they choose to be listed in.
So far I couldn’t find a way to do this
Hi all,
I’ve a question, I’ve create a custom type and add a custom taxonomy, in the admin i would like to filter the custom post by taxonomy (with a select box), it works like that for regular post, I didn’t find hot to do it for a custom post type.
Thanks for a great post Justin. I would like to know where the labels and other options of the register_taxonomy function get stored in the database. Does anyone know?
This is one half hey, “check this out” and one half a cry for help
The short of it is, in terms of build in functions, taxonomies don’t seem to be very well supported, yet. So it looked like a custom function was in order. I needed to take all the taxonomy terms for a post, mash them together, sort them (alpha on the taxonomy->name) and spit them out again.
Yes, I know that it kinda defeats the purpose of taxonomies but there is ultimately a method to this madness so please just play along
Finally, I don’t process to be a PHP coder. I get by. So please feel free to add your two or three cents. Ultimately, I’d like to add the taxonomy-> description as well. But one step at a time, eh?
Thanks in advance. Here goes nuttin’…
btw, for some reason I couldn’t get rtrim to work so that’s why I ended up using substr. Weird, right?
Thanks again Justin for your Insightful expose for the topic at hand.
It does seem though that there are some classic problems in getting certain content to display. While it’s easy enough to insert a plugin with a widget to display lists of a specific taxonomy’s terms, or to show the taxonomy of a specific post underneath it’s content similar to categories, it seems like everybody is struggling to get taxonomy archives working.
I can’t understand why it would be so difficult to allow clicking on a taxonomy term and getting a list of all posts from that terms. I’m sure there must be a way short of creating a custom template for each of the 100 terms you might want to list posts for but for the Life of me can’t find it.
I’ve been using the News theme from devpress and finding it impossible to get posts listed based on taxonomy terms.
I’m even struggling to get it running on the Twenty Ten theme.
Hi there,
I understand the following to allow me to create taxonomies and assign multiple post types to them:
register_taxonomy( $taxonomy, array( ‘post’, ‘how-to’, ‘reviews’ ), $arguments )
I need to achieve the same thing with the existing taxonomy “category”. When registering the taxonomy with my custom post type, I am able to choose a certain category (e.g. Apple) when writing a “review” about “iPods” in the admin menu.
The problem is that when choosing the same category for another post type, “how-to”, Wordpress creates a parallel category with the same name instead of assigning both post types to the same category:
For example:
The first post would be in:
http://mydomain.com/category/apple
and the second in:
http://mydomain.com/category/apple-category
Both are named “Apple” but that’s obviously not what I want. I would like browse the Apple category and see all different post types that were assigned to it listed there.
Anybody any clue how I can do that?
Thanks a ton
I would also like to know the answer to Phil’s question.
I would like my custom post type to use the existing taxonomy categories assigned to posts. How do I do it?
Found the answer. Sometimes it just takes a while to think of the right search terms. This needs to be added to the arguments passed to
register_post_type()Like this.
Is it possible to rearrange the tags in a custom taxonomy from low to high values? For example, under my Price Range taxonomy, I use these $29.99 & Below, $30.00 – $49.99, etc..
I want the tags in my price range dropdown to be in correct order. Right now, $300 – $350 is on the top instead of $29.99 & Below.
I have been trying but its not working. I even installed the Term Menu Order plugin but the tags are still not following.
Hope you can help.
Thanks
I was wondering about creating a drop-down list of my custom taxonomy in the admin view.
For example, I have a set of speakers. I want the speakers that are in the custom taxonomy to be listed in a drop-down list instead of the unordered list with check boxes. I have seen some documentation on it but it doesn’t seem that straight forward. Can you elaborate on this subject? Thanks!
BTW, I graduated from Auburn University too!
Hello! This post convinced me to buy your book
Just a question: I’ve added a custom post type named ‘ltn_reviews’, then I added custom taxonomy for this custom type only (author, genre, year, publisher, etc) and allowed ‘subscribers’ users to edit posts belonging to this custom type. But, out of the box, subscribers aren’t allowed to assign terms to the custom taxonomies. The only way I found is to add the ‘edit_posts’ capability to subscribers, but doing that allows subscribers to edit regular posts too, other than my ‘ltn_reviews’ custom post type. Is there a way to enable subscribers to assign terms to selected custom taxonomies only?
Thank you,
Gica
Hello,
Is it possible to order custom taxonomy terms in the admin area as a custom order?
I have found these lines
in the code when registering a custom taxonomy . However, it’s not really explained how it works and how it affects a custom taxonomy. Does anyone know?
Is there a good plugin that would re-order custom taxonomy terms?
Thank you,
Dasha
I’m having a helluva time getting taxonomy terms to show in the front-end on an Multisite install with the newest version of WordPress 3.1.3. I had it working before a week ago and now the terms just won’t list. Any advice on registering taxonomies on Multisite? Thanks!
Jason
Thank you for this tutorial! I’ve found it very helpful and it’s (almost) helped me solve my problem.
Do you know of a way to update the capabilities argument of the default ‘categories’ taxonomy? In particular, I would like to change the ‘assign_terms’ to something other than ‘edit_posts’ (which is what WordPress sets it to).
Adrienne, thanks for your code above. I hadn’t found mention of taxonomy exists in the codex. Much appreciated; got me over a hurdle.
Hi there,
great tutorial. But one thing I like to know.
How can I make this, for everyone exept “contributers”?
Cheers,
Denis
Give all roles, except contributors, the
assign_divisionscapability.