A taxonomy is a generic "category" used to organize posts and custom post types
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 ...
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' => ...
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 ...
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 ...
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 = ...
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 ...
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'=> ...
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 ...
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 ...
2
votes
1answer
590 views
How to add automatically keyword to taxonomies when a post published, and assign them to the post
How to add automatically keyword to taxonomies when a post published, and assign them to the post
for example i have in my post edition, a custom meta box, when you complete this input, a function ...
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 ...
1
vote
1answer
171 views
What hooks/filters are there to alter selected terms on post save?
Very simple, where would I hook/filter to alter the users selection of terms when they save a post (Update or Add)?
I need to hook in all instances; such as when saving a post via AJAX, saving when ...
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 ...
2
votes
1answer
503 views
How to group meta boxes on the post edit page
I suspect that this is not possible right now, but oh well.. I'll ask, maybe one of you has some intersting thoughts to share.
So let's say we have the following taxonomy terms meta-boxes on our post ...
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 ...
1
vote
1answer
803 views
Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
I have been reading dozens of posts and honestly, I have many doubts on how this work. Furthermore, I think that with WP3.1 more issues have been added here because I am having even more problems now ...
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.
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 ...
3
votes
1answer
595 views
How can you make permalink work for custom post type and taxonomy?
I have spent days now trying to figure this out, StackOverflow is my last resort. All I want is the following:
...
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 ...
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 ...
2
votes
1answer
686 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
1answer
104 views
How to add terms to a post depending on its title?
I want to add all posts with keyword "Dog Training" in the post title to a specific category.
Reason: If you enter something into WordPress search it's not an exact match. Previous WordPress search ...
0
votes
2answers
3k views
How to display custom taxonomies in posts?
Almost all themes display categories (with its permalink) by default. I am looking for similar type of code to add in my theme. From where can I get it?
To create custom taxonomies, I'm using More ...
5
votes
3answers
485 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.
2
votes
3answers
311 views
Child Terms not Displaying on the Taxonomy Term Admin Screen
I am experiencing an issue where terms with a parent are not being displayed in the category admin screen. The screen gives the total number of terms that should be there (i.e., 32), but only displays ...
2
votes
1answer
2k views
How to change permalink structure for custom post type and it's taxonomies?
This is a repost of an earlier question I had, but I like to go into more details now to be able to fully solve this.
So again, with (normal) posts changing the permalink is as easy as going to ...
0
votes
2answers
154 views
I want to remove the links from the term list returned by get_the_term_list
I want to keep this category title on my pages, but I don't want it to be a link.
<?php echo get_the_term_list( get_the_ID(), 'portfolio_cats', ' ', ' , ', ' '); ?>
Can anyone help?
Thanks
0
votes
3answers
506 views
how can i display taxonomy instead of category on my web page?
I want to display taxonomies instead of categories on the homepage of my blog. What can I do to achieve this?
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 ...
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 ...
2
votes
1answer
1k views
How do I dynamically populate wp_nav_menu from a custom taxonomy?
I know this question has been asked in different forms. But as far as I can tell from searching Google and SE/WP it's never been satisfactorily answered.
Let's say I have a taxonomy clubs and a ...
1
vote
2answers
649 views
Custom Post Type with Custom Title
I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code:
function custom_post_type_title_filter( $data , ...
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
- ...
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 ...
2
votes
1answer
1k 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 ...
2
votes
3answers
1k views
How to get the parent's taxonomy?
I have 2 customs post type : "Artist" and "Concert",
the "Concert" custom post type is the child of the "Artist" custom post type,
the "Artist" custom post type has a "genre" taxonomy.
What I'm ...
2
votes
1answer
859 views
How do I display a tag cloud with both post tags AND a custom taxonomy?
Using wp_tag_cloud(), how can I display a single tag cloud that incorporates both regular post tags and a custom taxonomy?
1
vote
0answers
109 views
Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
I need to be able to do the following:
List all terms in a custom taxonomy (categories for custom post type)
When a user clicks on a category, a listing of all posts in that category appears
When a ...
1
vote
1answer
500 views
Getting 404 on taxonomy page
i've created a custom taxonomy template for my taxonomy and custom post type,
custom post type name is "ecommerce" custom taxonomy is "ecommerce_categories", the problem is with the pagination it ...
0
votes
4answers
751 views
Display Custom Taxonomy in Sidebar in Two Columns
I have a custom post type (photos) with a custom taxonomy (categories) and I'd like to display the taxonomy list in my sidebar in two columns. I have a modified snippet that I found elsewhere to do ...
0
votes
1answer
1k views
Query multiple taxonomy in Custom Post Type
Currently I use:
query_posts("post_type=listing");
to pull all entries of my custom post type.
But I have a taxonomy called status with the values of Available, Pending, Sold.
I only want to show ...
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 ...
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 ...
2
votes
0answers
50 views
How can I get WP to build a feed based on multiple taxonomy terms
Currently, the best way to get a feed generated for a single taxonomy term is by letting wordpress generate the content automatically:
example.com/wordpress/feed?tax_slug=term_slug
However, is ...
2
votes
2answers
537 views
get term by id without taxonomy
Can I get the term by it's id without knowing to whish taxonomy it belongs?
I have a meta field that stores term ids, but doesn't store the taxonomy. However, all the get_term function have taxonomy ...
1
vote
1answer
93 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
3answers
1k views
How to create non-unique sub-category slugs?
What’s the best way to make Wordpress accept non-unique sub-category slugs?
By default, Wordpress ensures that every ‘slug’ portion of permalink URLs is unique, and is very savvy about using this to ...