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

learn more… | top users | synonyms

2
votes
1answer
5k views

Get the 'slug' of a custom taxonomy

Use case: I have a custom post type of 'show' for a music venue. In the sidebar we want to display any related 'show' to the current one on single-show.php. They will be related by a custom taxonomy ...
2
votes
1answer
785 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 ...
2
votes
1answer
44 views

Does WordPress Offer a Way to Find All of the Categories that Don't Have Children?

Background As discussed in Is There a Difference Between Taxonomies and Categories, taxonomies refer to a generalized system of classification and organization of objects or data. In the case of ...
2
votes
1answer
49 views

Custom post type with specific category structure

I have successfully created a custom post type (aka "Instruction") and two different categories (aka "Program" and "Exercise"). An "Instruction" needs to be filed under an "Exercise" and an Exercise ...
2
votes
1answer
141 views

Check if a post is in any child category of a parent category

In a site I'm developing, I have the following category structure: * movies (parent) * thriller (child) * comedy (child) * drama (child) The current post is in the comedy category. The ...
2
votes
1answer
448 views

Order Posts by Taxonomy and Meta Value

It's possible to order posts by Meta Value. It's possible to order posts by more than one value. And thanks to the code below it's possible to order by taxonomy. But how can I alter the code below ...
2
votes
3answers
125 views

base directories / URL

Is there a way to handle base directories for taxonomies that result in a 404. For example my URLs are: http://skipology.com/category/... http://skipology.com/app/... but the taxonomies / base ...
2
votes
1answer
508 views

Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts

I'm using get_the_term_list and manage_posts_custom_column to display the terms of a custom taxonomy in the list of custom posts, in the WordPress Admin. add_action( ...
2
votes
1answer
127 views

Wordpress renames slug of tags used in multiple taxonomies?

I've noticed Wordpress renames the slug of identical tags used across multiple taxonomies, is there an easy way to change this behavior? Let's say I create a tag called Nintendo under the publisher ...
2
votes
1answer
3k views

How to add terms to taxonomy with wp_insert_terms?

I have a huge excel database of locations which I want to add as terms to my current taxonomy. However, I don't know the best way to do this, as inserting manually could take weeks. I have looked at: ...
2
votes
1answer
1k 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
340 views

Set default (auto) slug prefix for Tags

Is it possible to add default prefix to the slug of each newly added Tag. So that full slug, would be stored in database (no rewrites). For example: Name: Tag1 -> Slug: prefix-tag1 Name: Tag2 -> ...
2
votes
1answer
228 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 ...
2
votes
1answer
678 views

Better way to enforce category hierarchy in post_categories_metabox?

The objective is to ensure that when editing a post, the metabox that lists a hierarchical taxonomy doesn't reorder itself upon Update to put checked items on top. Right now, edit-form-advanced.php ...
2
votes
1answer
316 views

How do I display custom post types through a common taxonomy?

I have posts and I have recipes. Recipes is a custom post type. Recipes make use of the category taxonomy and a newly added recipe has been categorized under beer. When I browse the listing page for ...
2
votes
3answers
586 views

Archive pages for posts based on their taxonomy?

Is it possible to display archive pages of posts based on their taxonomies, and an archive page of a term in that taxonomy?? For example, i have a site about beauty products, and i write a product ...
2
votes
1answer
31 views

wp_options table value

I am trying to understand a wordpress behaviour. When I add a tag in the admin panel mysql does a sequence of queries. Essentially: update wp_terms update wp_term_taxonomy and udate wp_options with ...
2
votes
1answer
63 views

Unable to delete a Category and Tag that share same slug

In my wordpress site I have a category (e.g Animals) with slug (anim) and a tag with name (Animals) with the same slug (anim). My problem is that I want to delete the category but keep the tag. ...
2
votes
1answer
93 views

Taxonomy Templates

I don't quite understand how to link to my taxonomy templates. Do I need to make a page-tempalte and query my terms from there? I'm using the taxonomy hierarchy currently: Taxonomy $labels = array( ...
2
votes
1answer
148 views

Category page only displaying the posts from a custom type

Situation I have two cpt: Projects Works In these two CPT I share the same taxonomy 'Category', and the same terms: Architecture Landscape Interior Design I have URLs like ...
2
votes
1answer
188 views

New categories are now going to 404s

I have a WPMU site with hundreds of blogs on it. We are on 3.4.2 and this is the first time I'm seeing this issue within a few of my sites. Basically, what happens is that I'll create a new category ...
2
votes
1answer
243 views

How to update taxonomy custom field with wp_update_term()?

I'm using Clipper, a coupon theme developed by AppThemes.com, and I'm trying to programmatically import coupons. The problem I'm having is each coupon needs to have a "store" added when it's ...
2
votes
1answer
115 views

Remove custom posts that match taxonomy value

I have a custom post type 'listings' and within that a taxonomy called 'status' where the posts are either 'standard' or 'premium'. What SQL query (or other method), could I use to delete all custom ...
2
votes
2answers
1k views

Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms

I am importing a large DB from an Excel spreadsheet into a wordpress DB. I was going to do it manually by creating a new table but decided to import it into the existing wordpress framework as it will ...
2
votes
1answer
180 views

Using Custom Posts with Metaboxes and Drop-downs

When using Custom Posts and adding a Metabox, I was wondering how I could add a drop-down menu that would populate data that was added by the user. For example I want to be able to select a 'source' ...
2
votes
2answers
301 views

Custom Post Type and Taxonomy combination

Is it possible to create a permalink/template structure like this: www.example.com/attractions <-- post type archive www.example.com/attractions/museums <-- taxonomy ...
2
votes
2answers
381 views

Organising Taxonomy categories

I have the following code in my sidebar to list all the taxonomy categories. <div class="left"> <h1>Categories</h1> <?php //list terms in a given taxonomy ...
2
votes
1answer
4k 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 ...
2
votes
2answers
637 views

How to list custom post types?

Here's what I'd like to do: a) Create a custom post type and write panel for a menu item called "My Stuff." b) "My Stuff" will behave like a category -- but the content will not appear in the main ...
2
votes
1answer
376 views

Show Custom Taxonomy Slug(s)?

can anyone help me with this? I need to print the slug of my custom taxonomy, can this be done? The following kind of works but it just shows the name, rather than the slug which i need for a class ...
2
votes
2answers
419 views

Bug when editing custom post type category?

When editing categories for my custom post type the selected admin menu is the one for posts (see screenshot). Is this a bug. If not it's kind of non intuitive, and not so good for the end users ...
2
votes
4answers
3k views

wp_set_object_terms() Fails to Set Terms

Okay guys, here's the scenario. I'm am trying to setup a function that will automatically duplicate a post (when published) over to another post type. So, a regular blog post is published, and when ...
2
votes
1answer
956 views

Query Posts by taxonomy/Taxonomy Child Custom order

This is an ongoing request, trying to do maximize some code to display a list of Accomodation by Country, of a certain Type, and a specific Region. So for example, a list of ALL accommodations in ...
2
votes
1answer
668 views

Conditional tag affecting taxonomy term and its children?

I am wondering how can I write a conditional tag that affects a custom taxonomy slug and its children? Found this in Wordpress Codex: is_tax( 'flavor', 'mild') When the archive page for the ...
2
votes
1answer
242 views

How to prevent posts duplicating when viewing a custom taxonomy term

My question is fairly basic. I have an archive.php and inside I have the main loop like so: <?php if (have_posts()) : while (have_posts()) : the_post(); ?> Do stuff here <?php endwhile; ...
2
votes
1answer
5k views

Custom Metabox with Taxonomy Dropdown - Saving Issue

My goal was simple --- to create a custom post type with a custom metabox with a simple drop down list of taxonomy terms instead of utilizing the tags or checkboxes. The reason was to ensure that the ...
2
votes
1answer
53 views

Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy

I have registered a custom post type "Animals" and also two custom taxonomies ("Vertebrate" and "Type") assigned to it, which have their own specific terms, for "Vertebrate" it will be "Mammals" and ...
2
votes
1answer
108 views

Get list of terms of current taxonomy archive for another taxonomy

I have a Custom Post Type named 'Real estate' which has (amongst others) two different taxonomies: 'Purpose' (hierarchical; terms used are 'Living', 'Working' and 'Holidays') and 'Location' ...
2
votes
1answer
513 views

wp_insert_term doesn't work with custom post type's taxonomy

Here is the problem I am having: I have a custom post type called "weddingguests" This custom post type "weddingguests" has a custom taxonomy, "friendsof", hierarchic I want to programmatically ...
2
votes
1answer
4k views

How does Woocommerce store variation attributes, and how can they be retrieved per-variation? [closed]

I am trying to pull out a list of product variations from a Woocommerce installation, with their attributes - something like this: product id variationid name color size 5 1234 ...
2
votes
4answers
3k views

show tags of custom post type ONLY

I have a custom post type with tags included as a taxonomy, I am trying to display a list of all the tags that are in the custom post type only. I initially used: wp_tag_cloud(); which generates ...
2
votes
1answer
157 views

Permalink Rewrite for Custom Taxonomy

I have added a custom taxonomy called 'Boards' with the following code function add_custom_taxonomies() { register_taxonomy('board', 'post', array( 'labels' => array( 'name' ...
2
votes
0answers
295 views

Best way to programmatically link to multiple categories (union/intersection) [closed]

This question assumes that you know about the various complex taxonomy queries available from the WP_Query API. I know about tax_query as well as about things like category__and, which allow you to ...
2
votes
1answer
63 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
1answer
253 views

How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?

I have a custom hierarchical taxonomy containing only two levels of items. First Level the title, second level items of the taxonomy. Is it possible to add a "meta box" to the posts editor of ...
2
votes
1answer
120 views

“Reversable” and “Re-useable” Subcategories (or other taxonomic structure)

Hope you can help a WP newbie :) It is my understanding (and please correct me if I'm wrong!) that I cannot use the same subcategory slug in multiple parent categories, i.e. this structure is ...
2
votes
0answers
671 views

Taxonomy/category hierarchy lost when editing posts [closed]

When editing a post the tree structure of the taxonomy seems to be lost, ie; if I set the following when adding a post: [x] Top tier category 1 - [x] Cat 1 sub-category 1 - [ ] Cat 1 sub-category 2 - ...
2
votes
0answers
894 views

Relationship between two taxonomies and a custom post type [closed]

for a project, I've a CPT products with two taxonomies : category and brand. I would like to build a navigation from a category to a product under a brand. page 1 : list the categories terms page 2 ...
2
votes
1answer
225 views

Having trouble understanding custom post type and taxonomy :/

I am developing a Wordpress site that will have a database of car modifications and an embedded youtube video with the results. For example: search for Honda Civic with a spoiler and exhaust. This ...
2
votes
2answers
589 views

create a back-end wordpress content submission using custom post type

I have a previously created thread here, but was recommended to make a new one: I need basic help with custom post types. Basically here's my project: I have to create a back-end wordpress gui user ...