Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

learn more… | top users | synonyms

26
votes
4answers
8k views

Custom post types, taxonomies, and permalinks

This is driving me nuts and I'm sure it's simple but nothing I search for comes up with a simple structure (everything is very complex). I have a custom post type "product_listing" and a custom ...
20
votes
2answers
18k views

How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

I've been combing this site and google for the answer and I've come up completely empty. Basically I want to do exactly what this post asks, but I need a hierarchical taxonomy. The answer given in ...
18
votes
3answers
13k 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 ...
14
votes
2answers
8k views

Mixing custom post type and taxonomy rewrite structures?

Basically I want to achieve a glossary using custom post types and have some issues setting up rewrites the way I want them to be. I want it like that: The main glossary URL: ...
10
votes
5answers
3k views

Inserting terms in an Hierarchical Taxonomy

I'm really having a few issues with inserting terms. Here is my scenario: I have a taxonomy called veda_release_type: //Release Type and Region $labels = array( 'name'=> ...
11
votes
8answers
7k views

Remove taxonomy slug from a custom hierarchical taxonomy permalink

I created a 'forum' taxonomy, using these rules: register_taxonomy( 'forum', array('topic'), array( 'public' => true, 'name' => _a('Forums'), 'singular_name' => ...
12
votes
5answers
11k views

Include custom taxonomy term in search

I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, ...
3
votes
1answer
1k views

Exclude Specific Term from Search

It is possible to search for posts with a specific term by appending the URL with: ?&term=abc Is it possible to do the opposite and search excluding a specific term? Something like: ...
16
votes
4answers
28k views

Advanced search form with filters for custom taxonomies and custom fields

I'd like to build an advanced search form for a specific custom post type, having filters for that custom type's custom fields and custom taxonomies AND for another custom type's properties (fields ...
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 ...
1
vote
2answers
1k views

Permalinks: custom post type -> custom taxonomy -> post

I am having trouble working with wordpress' rewrite rules, and could use some help. I have a custom post type called shows. All shows have a single custom taxonomy category show-category. A show ...
0
votes
3answers
7k views

Get current term's ID

Im using the following code to get an array of children taxonomies and write them out with links in an unordered list. <?php $termID = 10; $taxonomyName = "products"; $termchildren = ...
5
votes
1answer
9k views

Rewriting a custom-post-type permalink with taxonomy term?

I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type add_action('init', 'wr_events'); function wr_events() { ...
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 ...
2
votes
1answer
907 views

How can I display parent and child taxonomies in separate drop downs?

The requirement is where i have a taxonomy State which is the parent and it has a child sub-taxonomies they are the Cities, Need to display the state as a drop down, when i select the particular state ...
3
votes
1answer
6k views

Custom Taxonomy specific to a Custom Post type

I want to create a custom taxonomy which behaves similar to the post type as a category behaves to a the default posts (on the grounds of /%category%/%postname%/ permalink structure) so that the posts ...
0
votes
1answer
994 views

custom post type taxonomies UI radiobuttons not checkboxes

Is there a way to replace the default checkboxes by radio buttons in the custom post type taxonomy UI? I have custom post type 'questions' with taxonomy 'answer type' (single selection [radio button], ...
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 ...
4
votes
5answers
5k views

Custom taxonomy, get_the_terms, listing in order of parent > child

I have a hierarchical custom taxonomy which I can display using print_r(get_the_terms( $post->ID, 'taxonomic_rank' ));: Array ( [46] => stdClass Object ( [term_id] => ...
2
votes
4answers
11k views

Get the the top-level parent of a custom taxonomy term

How would I get the top-level parent of a given term? I am using wp_get_object_terms to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' ...
2
votes
1answer
970 views

Custom Taxonomy in plugin and template

I have a plugin that I am developing that is using custom post types and taxonomies. My question is this. How can I load the content/theme data from my plugin on to the page when the go to the custom ...
3
votes
1answer
3k views

How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy

This answer provides the code for a query that returns an OR match on a taxonomy term: global $query_string; $args['tax_query'] = array( array( 'taxonomy' => 'status' ,'terms' ...
2
votes
2answers
2k views

Include and Exclude Taxonomies From Archives & Feeds Using 'pre_get_posts'

What I am trying to do? My blog uses a custom taxonomy called edition with terms like us-canada (6), eu (7) and india (8) -- term slug (ID). I want to make sure that posts not assigned to any ...
4
votes
1answer
4k views

Creating Photo Gallery System with Custom Post Type

I'm creating a movie blog using WordPress. I have Movie and Trailer custom post types and I want to add a Photo feature for this and I want to add a relationship between this photos and Movie CPT. ...
3
votes
1answer
660 views

Determine if Term has Grandparent/Great-Grandparent

I have a custom taxonomy (hierarchical) for which I'm outputting the results. For example's purpose: --Drinks ----Tequila ------Reposado ------Blanco ----Beer & Wine ------Beer ------Wine ...
2
votes
2answers
427 views

Getting archive pages in WP's AJAX internal link finder?

I often need to link to custom taxonomy term archive pages and would love to be able to do so through the AJAX internal link navigator added to the visual editor in 3.1. Is there any way to get this ...
7
votes
6answers
10k views

Get terms by taxonomy AND post_type

I have 2 custom post types 'bookmarks' and 'snippets' and a shared taxonomy 'tag'. I can generate a list of all terms in the taxonomy with get_terms(), but I can't figure out how to limit the list to ...
11
votes
2answers
3k views

Altering the appearance of custom taxonomy inputs

I'm working on a site that will make use of a few custom taxonomies (for custom post types). I've chosen to make some of the taxonomies hierarchical because the method of inputting values (checking ...
4
votes
5answers
5k views

Adding Custom Field to Taxonomy Input :Panel

I am looking to achieve something which I figured would be fairly simple to accomplish but it seems there are no real examples available to achieve my needs. Essentially I have a custom post type of ...
7
votes
1answer
536 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 ...
3
votes
2answers
2k views

Custom post type taxonomies URL rewrite

What I want to achieve is an online listing catalog with a URL like this: www.example.com/drawing-tools/brand/type/material/color/ In this example, I have a custom post type named "drawing-tools" ...
4
votes
4answers
8k views

How can I get only parent terms?

Is there any way to get only parent terms from custom taxonomy or category?
2
votes
2answers
3k views

Displaying Posts Related to Other Posts by a Taxonomy Term?

I have a custom post type for musician's profiles, and a taxonomy for their location (categorised hierachically into Countries and then Cities). On the musician's individual profile pages I need to ...
0
votes
1answer
1k views

Custom-Taxonomy as categories: Remove “most-used” tab?

I created a custom-taxonomy for a custom-post-type which functions as kind of categories for this post-type. The Metabox for my taxonomy has two tabs. One for my Categories and a second tab called ...
5
votes
3answers
3k views

Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?

(Moderators note: Was originally titled "How to get_posts of a custom post type that is in two custom taxonomies?") I have a custom post type that has two taxonomies which are separate, one called ...
3
votes
5answers
555 views

How to do a custom bookmarks post type?

Let me first explain what I am wanting to do... I am wanting to add all my hundreds of website bookmarks that I have now in my browser, into wordpress for the following reasons. Can search my ...
3
votes
1answer
958 views

How do you remove a Category-style (hierarchical) taxonomy metabox?

I was wondering if someone can help me with this. I'm currently following Shibashake's tutorial about creating custom meta-boxes that include taxonomy selection here: ...
2
votes
1answer
4k views

Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT

Wondering if someone could tell me why sub pages (child pages) no longer work (eg: www.mysite.com/type/childpage). I have a page called "Type" (working fine), and I wish to have Child Pages of "Type" ...
1
vote
2answers
355 views

WordPress taxonomy radio buttons

I am trying to change the checkboxes for the terms on the backend to radiobuttons. I found this topic: Altering the appearance of custom taxonomy inputs however wich helped me doing this. However, ...
1
vote
1answer
857 views

Wordpress returns 404 on custom rewrite rule conflict in parameters

I have been following the steps on the answer here and it worked wonders. But my problem is on this part, on the original: add_filter('rewrite_rules_array', 'mmp_rewrite_rules'); function ...
1
vote
1answer
750 views

Combine two taxonomies in a hierarchical tree

For example, I have WooCommerce products that have taxonomies: brand (e.g. Converse, adidas, D&G) (taxonomy id: product_brand) category (e.g. Boots, Sneakers, Sandals, Heels) (taxonomy id: ...
1
vote
1answer
378 views

Automatically create child pages when saving a (parent) page

I have a bit of a tricky one... I have a hierarchical Custom Post Type ('shows') that represents events. Is it possible for the user to create a new page (ie show), save the page and for Wordpress to ...
3
votes
2answers
503 views

Copy a Taxonomy Term into the Post Title for a certain Custom Post Type

I am using Gravity Forms to allow users to create posts from the front end. However, the way this site I am building is going to work, one specific Post_Type is essentially just a "Data" post. There ...
1
vote
1answer
2k views

Order get_terms() By Custom Field

I want to order my categories like I order my pages. I've added an extra field called Order to my taxonomy, but how do I order my terms by this value? Adding and Saving my Order Value: /** Add New ...
1
vote
3answers
8k views

Get main parent categories for a product

Can someone please help me, I'm looking for a way to find the main parent product category of a WooCommerce product? Say, the product is marked under Gadgets, but the main parent of them all is ...
0
votes
1answer
105 views

Categories under custom post types doesn't show properly

I used a custom post type in my website: I added archive-{mytaxonomy}.php and also single-{mytaxonomy}.php. I also created a separate sidebar for my taxonomy and everything looks fine until I click ...
19
votes
3answers
16k 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?
7
votes
1answer
3k views

Shouldn't this be easy?! Custom post type/custom taxonomy permalink

So this is driving me absolutely insane. I've spend days trying to fix this and I can't work out why this is so difficult as surely this is a very common permalink structure! I looked through ...
2
votes
1answer
298 views

Get terms that contain posts that in turn belong to other terms?

So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that? ...
5
votes
5answers
9k views

Display all posts in a custom post type, grouped by a custom taxonomy

I’m working on a member page where I use a custom post type with a custom taxonomy. My custom post type is called “member” and my custom taxonomy is called “member_groups”. I want to list all the ...