A taxonomy is a generic "category" used to organize posts and custom post types
24
votes
1answer
305 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 ...
16
votes
4answers
8k 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 ...
14
votes
3answers
7k views
How to get all taxonomies of a post type?
How can i get taxonomies of a post type?
Suppose i have a post type 'event' now i need to find out the list of taxonomies that are attached to this post type.
13
votes
1answer
3k 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 ...
13
votes
2answers
7k 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 ...
11
votes
7answers
3k 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
- ...
10
votes
5answers
4k 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() {
...
9
votes
3answers
4k 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 ...
8
votes
3answers
4k 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 ...
8
votes
1answer
1k 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 ...
6
votes
3answers
2k 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 ...
6
votes
1answer
1k 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
2answers
406 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
1answer
262 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
3answers
335 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
3answers
963 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.
5
votes
2answers
683 views
How it is possible to use taxonomies on attachments?
With WordPress 3.5 was changed the media management and edit screen use the default of edit post type UI. The taxonomies is very usefull for WP installs, there have different users and attachment to ...
5
votes
3answers
3k 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
2answers
4k 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
3answers
484 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.
5
votes
4answers
664 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 ...
5
votes
5answers
707 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
1answer
862 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
839 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
1answer
367 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
444 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
2k 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 ...
4
votes
3answers
4k 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
1answer
1k 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 ...
4
votes
4answers
3k 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
2answers
1k 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 ...
4
votes
1answer
178 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
124 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
3answers
226 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 ...
4
votes
1answer
132 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
487 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 ...
3
votes
1answer
3k 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'=> ...
3
votes
4answers
7k 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' => ...
3
votes
3answers
4k 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.
...
3
votes
1answer
1k 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 ...
3
votes
2answers
765 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.
3
votes
2answers
1k views
Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
After reading
Adding a Taxonomy Filter to Admin List for a Custom Post Type? I tried it but I wasn't able to get it to filter two (2) different taxonomies at same time. The system is only filtering ...
3
votes
1answer
1k views
List taxonomy terms as links
How can I make a list of links of all the taxonomy terms I'm using? For example, I have a taxonomy of Manufacturers with terms of Honda, Ford, etc. I want to list out those terms as links.
3
votes
1answer
144 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 ...
3
votes
1answer
704 views
Wordpress custom taxonomy description for each post?
In a Wordpress blog, I'd like to put the term description of a specific custom taxonomy in the footer of each article.
Is this possible? I've tried
<?php term_description( $term_id, $taxonomy ) ...
3
votes
1answer
2k 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 ...
3
votes
1answer
2k views
Custom Taxonomy Template Post List with Sort Order
I have an interesting problem I am trying to solve. Here is my situations:
I have create a custom post type for "events".
For each event post I require custom fields to be entered for the event ...
3
votes
1answer
105 views
Integrate post tags in Post Edit page with qTranslate
Summary
In the tags widget in the Post Edit page, I need to know a way to filter through:
the tags suggestions
the tag terms update when saving or updating the post
At least that is what I think ...
3
votes
1answer
171 views
Custom Taxonomy-specific JavaScript
I'm looking to add some scripts and styles to particular taxonomy page. For example, I want to have a banner rotator only appear for posts that fall under the "issue" custom taxonomy. I've tried ...
3
votes
1answer
85 views
How would I leverage custom Taxonomies in this scenario?
2 Tier research:
I am building a site for a client that specializes in research travel. They offer 2 tiers of research assistance, "Standard" and "Premium". Each of those levels of service have ...