Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.
17
votes
4answers
4k 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 ...
10
votes
2answers
4k 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 ...
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 ...
12
votes
2answers
5k 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
7answers
5k 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' => ...
3
votes
1answer
566 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:
...
9
votes
4answers
6k 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, ...
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 ...
7
votes
4answers
1k 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'=> ...
2
votes
1answer
537 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 ...
0
votes
3answers
4k 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 = ...
0
votes
1answer
601 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], ...
3
votes
4answers
2k 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
1answer
2k 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 ...
2
votes
1answer
431 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 ...
4
votes
1answer
2k 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.
...
2
votes
2answers
322 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 ...
10
votes
4answers
12k 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 ...
4
votes
5answers
4k 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 ...
1
vote
2answers
5k 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' ...
1
vote
1answer
4k 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
2answers
714 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 ...
1
vote
2answers
3k views
How can I get only parent terms?
Is there any way to get only parent terms from custom taxonomy or category?
4
votes
3answers
2k 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
382 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 ...
2
votes
1answer
3k 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" ...
0
votes
1answer
457 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 ...
1
vote
1answer
2k 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' ...
6
votes
6answers
7k 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 ...
5
votes
1answer
284 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
1k 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" ...
7
votes
1answer
2k 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
189 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?
...
14
votes
3answers
8k 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.
3
votes
1answer
1k views
URL rewrite rules for multiple taxonomies query
I'm trying to create some pretty URLs for links querying multiple taxonomies. I'm using the "Taxonomy drill-down" plugin, although the main usage is now integrated @ the core it still has some helpful ...
4
votes
1answer
166 views
Dynamic taxonomy in permalink made all other posts NOT FOUND?
I added my taxonomies in the permalink instead of the Custom Post Type's slug, and it works fine. I'd even say everything was working fine but changing the WP installation to Multisite broke all other ...
3
votes
4answers
3k views
Counting Posts of a Given Post Type Having a Specific Taxonomy?
(Moderator's note: The original title was "How to know the number of custom type posts having a specific taxonomy")
I'm stuck with the function wp_count_posts()!
I created custom post types called ...
2
votes
1answer
1k views
Rewrite permalinks for custom posttype and custom taxonomy
How to rewrite permalinks for a custom posttype and custom taxonomy?
I have a custom taxonomy: region, and a custom posttype: business.
Now, how to rewrite the permalink, so that
for a category, ...
4
votes
1answer
380 views
Can I turn off write-in tags/taxonomies?
One of the big problems my site staff has had with tags is the overwhelming number of similar or duplicate tags, due to the write-in ability.
I'm about to add new custom taxonomies to my site for ...
2
votes
1answer
723 views
Permalink rewrite with custom post type and custom taxonomy
I think thats a quick one:
I've got:
Custom post type: Food
Custom taxonomy (Registered to Food): Fruits
Terms in Fruits: Apple, Orange, Cherry
If I type in example.com/food?fruits=Apple,Cherry, ...
2
votes
1answer
689 views
Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
Let me explain the problem I am dealing with:
I have 2 custom taxonomies. One is named "thestate" and the other one is named "thetown".
In "thestate" I have listed all the states in the U.S.
In ...
2
votes
8answers
7k views
Filter get_categories() for taxonomy term in WordPress
I want to show a category only if a (custom) post is in that category AND region = $name for that post.
So, e.g. I have a custom post (type "business") named "Mamma Mia" in child-category: ...
1
vote
2answers
279 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 ...
1
vote
3answers
654 views
Require a Custom Taxonomy to be checked
I have a custom taxonomy, "position", with multiple terms for a custom post type, "employee" in the admin. I want to validate the form to require a position to be selected when you save/update a post.
...
1
vote
2answers
874 views
Unable to save custom taxonomy terms in a custom-built metabox
I've roughly followed the tutorial here on how to create "custom taxonomy input panels". I'm using a custom post type of homes and a custom taxonomy called beds (used to record the number of beds in a ...
0
votes
1answer
100 views
Semantic URL Custom Post Type and Taxonomies permalinks
I have created a custom post type with custom taxonomies. Now I need help with the permalinks.
Now is like that:
custom post type archive: example.com/custom-post-type/
taxonomy archive: ...
0
votes
1answer
420 views
Get second level terms of custom taxonomy
I want to get second level terms of a specific parent (first-level) term in a custom taxonomy. Sounds complicated but would be useful.
Term 1
SubTerm-1.1
SubTerm-1.2
SubTerm-1.2.1
Term 2
...
0
votes
1answer
236 views
Unable to display the post titles in a drop down
I have post type Dealers and a taxonomy Manufacturer i have a list of manufacturers and relevant posts. Im trying to display the list of manufacturers in a drop down, when a manufacturer is selected ...
0
votes
4answers
349 views
Pagination throws 404
I'm experiencing some problems with my pagination when displaying custom post types. I would like to display 9 posts and then display a numeric pagination. This is working, some links are generated ...
0
votes
1answer
461 views
Filter all queries with a specific taxonomy
Is there any way to filter all post queries and add a specific taxonomy? Case in point, I have a taxonomy object of "Region" with terms like "Global", "Americas", "Europe", etc. (Users designate ...
