A taxonomy is a generic "category" used to organize posts and custom post types

learn more… | top users | synonyms

25
votes
1answer
321 views

How to perform unit testing on proposed patches in Trac?

I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new ...
20
votes
3answers
17k views

How to get all taxonomies of a post type?

How can i get taxonomies of a post type? If I have a post type event and i need to find out the list of taxonomies that are attached to that post type. How do I find them?
19
votes
4answers
15k views

Using wp_query is it possible to orderby taxonomy?

My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query. Now my problem is I would like to orderby the taxonomy, but from documentation ...
18
votes
1answer
7k views

The Difference Between Hierarchical and Non-Hierarchical Taxonomies?

The question is "What is the Difference Between Hierarchical and Non-Hierarchical Taxonomies?" This question really stumped me at first so I figured it would be a good idea to show the difference to ...
18
votes
5answers
14k views

Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?

The question is "How do I add one or more fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?" This question was asked on the wp-hackers list August 1st 2010 and I ...
15
votes
3answers
9k views

Renaming Custom Post Types and Taxonomies

I started developing a site with over a dozen custom post types. I'd like to rename a few of them, not just the display value, but the actual custom post type name. I'm worried however that by just ...
15
votes
8answers
9k views

How to show a hierarchical terms list?

I have a hierarchical taxonomy called 'geographical locations'. It contains continents on a first level, and then the countries for each one. Example : Europe - Ireland - Spain - Sweden Asia - Laos - ...
12
votes
5answers
5k views

Can I add a Category Metabox to attachment?

I am using register_taxonomy_for_object_type() to add the Category taxonomy field to Media uploads (attachments). I'm using this code to do so: add_action('init', 'reg_tax'); function reg_tax() { ...
11
votes
1answer
5k views

Saving Taxonomy Terms

I have an interesting problem which I hope someone can quickly answer. I have created my own metabox which, based on "MY METABOX CODE" (list below) is correctly displaying a dropdown list of all my ...
9
votes
4answers
4k views

Can the default “post tags” taxonomy be renamed?

I'm intending to use the default "post tags" taxonomy to provide a common set of tags across posts and 2 custom post types (to allow for collection/aggregation by tag). I'd like to rename the "post ...
8
votes
2answers
1k views

Is There a Difference Between Taxonomies and Categories?

I've been reading the codex for WordPress closely and am confused about the vague definitions between what a Taxonomy is and what a Category is. For that matter, term is also a word that is used in ...
8
votes
2answers
4k views

get_terms by custom post type

I have two custom post types 'country' and 'city' and a shared taxonomy 'flag'. If I use: <?php $flags = get_terms('flag', 'orderby=name&hide_empty=0'); I get a list of all terms in the ...
8
votes
1answer
2k views

Taxonomy dropdown metabox in the back-end

I've created custom taxonomy called Brands and made it hierarchical so I can add Car brands and models there and keep their relations, like this: Ford Mustang Mondeo Focus Problem is, this list ...
7
votes
2answers
514 views

Why does get_term() require taxonomy? Are term_ids not unique?

A related WPSE question asks how to get the term by specifying ID only, without specifying taxonomy. My question is more philosophical. Generally, stuff in WP core is there for a reason. I'm trying to ...
6
votes
3answers
9k views

Attaching taxonomy data to post with wp_insert_post

I am implementing (trying) a front end posting system which shows taxonomy data in several dropdown select fields, each of the dropdowns is named by using the "name" $arg in wp_dropdown_categories. ...
6
votes
3answers
2k 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.
6
votes
1answer
360 views

Add 'Description' to taxonomy 'Quick Edit'

This seems fairly straight forward, but I cannot find a definite guide on how to add the taxonomy description field to the quick edit box. I've followed several tutorials on adding fields to the ...
6
votes
5answers
4k views

How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms

I want to export all Wordpress categories (no posts, just categories) from one blog to another. How can I do that ?
6
votes
4answers
3k views

How do I append multiple taxonomies to the URL?

Multiple taxonomies in URL How does one append multiple taxonomies to the URL having the following: Post Type: products Taxonomy: product_type Taxonomy: product_brand Adding new ...
6
votes
4answers
2k views

Plugin to restrict non-admin user to existing tags

Is there a plugin that would restrict non-admin users to only existing tags? I could have used categories for this, but it will be difficult to display with a large population (~1000) of tags.
6
votes
1answer
2k views

Best way to programmatically remove a category/term from a post

I am working on a script to convert all posts in a given category to use a postmeta flag instead (testing of MySQL has shown me that on a site as large as mine this will lead to a meaningful decrease ...
6
votes
1answer
989 views

Permalink with sub-sub-category and post name

Working on a new theme project and I created a custom post type called products with its own custom taxonomy. I want the URL structure to be: ...
5
votes
1answer
6k views

Custom taxonomy list page?

I've been searching Google for this to no avail. I'm working on a restaurant site, and I have a custom post type for dishes, like so: $args = array( 'labels'=> $labels, 'public'=> ...
5
votes
4answers
5k views

Attaching Metadata to a Taxonomy Item

I have a taxonomy of menus i.e. Coffee, Tea, Sandwiches, Cakes etc. I want to add more information 'about' the taxonomy such as an image that represents it alongside the other pieces of taxonomy ...
5
votes
3answers
4k views

How to use taxonomies on attachments with the new Media Library?

WordPress 3.5 changed the media management and now the Media Library edit screen uses the default post type UI. Taxonomies are very useful for WP installs with different users and attachments, giving ...
5
votes
3answers
659 views

Separate Media Library for each user

I'm creating a theme for a client and one of their requests is to allow users to upload images for their own use, but there may be an option to share the images. Here are some of the caveats: Each ...
5
votes
1answer
15k views

Get Posts by Custom Post Type ,Taxonomy, and Term

Ok, so i have a Custom Post Type called "Services". This custom post type has a taxonomy called "Areas" and there's 5 terms in that taxonomy. Let's say I have 10 posts on "Services" and there's 5 ...
5
votes
1answer
5k views

How to get taxonomy term of the current page and populate queries in the template

I've been stumbling around trying to figure out how to get a specific taxonomy term of the current page so that I can subsequently populate queries on the page for other post types that share the same ...
5
votes
3answers
5k views

Custom Post Type - Taxonomy Dropdown Menu?

I have created a custom post type and added various meta boxes/fields to this custom post type. All is working excellent except for one element... Instead of utilizing the default interface for ...
5
votes
5answers
2k views

Different post sort order within different categories

I need to give each post a unique post order for multiple Categories (per post) it is in. I can imagine a solution using custom fields whereby for each Category there is a corresponding custom field ...
5
votes
2answers
7k views

get_categories for custom post type with a specific custom taxonomy attached

Basically I have a custom post type of 'products' which has two taxonomies attached to it...the normal 'category' and a custom taxonomy called 'brands'. I have a page which is 'brand' specific. On ...
5
votes
1answer
559 views

Weird behaviour when adding terms/term_taxonomies programmatically

This certainly looks like a bug to me. I put together the following code for you to test it on a fresh install. Basically, the code will add two sub categories under the "uncategorized" to achieve ...
5
votes
1answer
1k views

How can I create a taxonomy meta-box with search suggestions but no new terms input?

I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the "tags" kind (with search field and automatic suggestions), but without the right to add a new ...
5
votes
2answers
1k views

Share one taxonomy across multiple blogs in 3.0 [duplicate]

Possible Duplicate: WordPress Multisite - global categories I have a series of blogs that will use some, but not all, of the same posts. We have one blog where many of the posts are ...
5
votes
3answers
645 views

Taxonomy term in permalink

I have a big problem. I have been banging my head on this all day long. It seems to be a stupid easy question. Possibly also with a stupid easy answer. But I can't seem to find it. What I want is ...
5
votes
1answer
537 views

How to organize and cache additional data associated with terms?

I'm updating a plugin of mine and am have a hard time figuring out the "best way" to build in a specific bit of functionality. The plugin allows users to associate images from their media library to ...
4
votes
4answers
12k views

Custom Taxonomy WP_Query for All Terms in a Taxonomy?

Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy? I know this technique: $custom_taxonomy_query = new WP_Query( array( 'taxonomy_name' => ...
4
votes
1answer
2k views

Sortable admin columns, when data isn't coming from post_meta

I have a custom post type that uses a custom taxonomy. I'm imposing a limit of a single term to each post (using a custom meta box drop down on the edit post screen for the CPT). The term for the ...
4
votes
3answers
5k views

Custom Post Type Archives by Date and Taxonomy

Lets use the classic example of a custom post type called "movies", with its own taxonomy called "genre". By registering the custom post type (with a "movie" slug), the permalinks are already set up ...
4
votes
3answers
6k views

How to add a default item to a custom taxonomy?

Wordpress default taxonomy (Categories) has the item Uncategorized by default. How to add a default item to a new custom taxonomy? functions.php: // === CUSTOM TAXONOMIES === // function ...
4
votes
4answers
6k views

Add custom taxonomy fields when creating a new taxonomy

I've been able to leverage this super tutorial by @Bainternet in order to add custom fields for taxonomies. I've tweaked the markup, and added a separate callback to add fields to the "Add New ...
4
votes
1answer
65 views

WP query taxonomy input differs to output?

I'm trying to build a custom query and I need to include the current category ID. I previously had the WP_Query args as: Array ( [post_status] => publish [posts_per_page] => -1 ...
4
votes
1answer
201 views

List Hierarchical Term List with Count with Related Term

What I have are custom posts (of a custom post type, wps_business) that have two taxonomies (wps_location & wps_type), and I would like to list all the terms from type of a specific location. For ...
4
votes
1answer
258 views

Wordpress - Creating multiple versions of the same single-customtype.php depending on selected taxonomy categories

I have registered a custom post type 'Clients' and a taxonomy for this post type for categorizing posts. There are currently 3 categories for a Client: 'Logo Project', 'Video Project' and 'Web ...
4
votes
1answer
232 views

Return only the custom sub-term for custom post type, do not echo term-parent

I've made a custom function that retrieves the custom taxonomy term for a list of posts in a query, and echos both the name and the link. Additionally, it also excludes listing a term if I specify the ...
4
votes
1answer
248 views

Get total number of comments from posts in a specific custom taxonomy

I’m having some difficulties trying to get total number of comments from posts within a specific custom taxonomy. The setup is as such: I’ve created a custom taxonomy for my posts, called “features”. ...
4
votes
1answer
601 views

get_terms() How many is TOO many?

Working on revamping a plugin of mine when I noticed that wp_count_terms() is not reflecting the same number as a call to count( get_terms() ) with the same $args passed. I'm pretty sure this is a bug ...
4
votes
2answers
123 views

Custom taxonomy: same terms, but for different years

I'm building a directory of people in a boarding house. What I'd like to do, is to be able to assign the following metadata to each person: Room number Parking space number Leadership positions ...
3
votes
2answers
4k views

Get the first Category / Term only in single-custom-post.php

found close stuff but none that exactly answers my question.. so.. How do i get the only the first taxomony (category) of a custom post type... i can get all - no problem.. this what i am using to ...
3
votes
4answers
3k views

Remove the category/taxonomy description field?

How can I remove the category/taxonomy description field? The one which shows up on the edit category/taxonomy page.