In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.

learn more… | top users | synonyms

2
votes
1answer
625 views

Edit post meta with checkboxes on front end

I'm trying to build an interface so that two custom fields for a custom post type can be edited on the front end with checkboxes. I'd like to display empty checkboxes if neither of those the fields ...
2
votes
1answer
537 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 ...
2
votes
2answers
504 views

Are Categories, Tags and Custom Taxonomies any different in regards to SEO?

Simple question, really. I know pretty much nothing about SEO, and i'm trying to define a good structure for this clients online magazine. I already know i'll be using a few custom taxonomies along ...
2
votes
1answer
799 views

orphaned taxonomy terms remove by sql query

I have 3 custom post types each of these CPT's have posts that are set to auto delete via a given time scale by cron jobs, thing is when they are deleted it leaves behind orphaned taxonomy terms in ...
2
votes
1answer
333 views

post count is wrong when using same taxonomy for 2 different CPT

1 custom taxonomy registered for 2 different CPT (custom post type). When i entered to edit tag section on edit-tags.php?taxonomy=mytaxonomy&post_type=cpt1 it displays total post count of 2 ...
2
votes
2answers
720 views

wp_update_term: How could i update the “name”?

I was just looking at wp_update_term and haven't found any possibility to update the "name" of the term. My scenario is pretty simple: I got some predefined taxonomy terms in a config file like this ...
2
votes
1answer
52 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
322 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
1k views

Display the Terms from a Custom Taxonomy Assigned to a Post(inside the loop) in Hierarchial Order

This link tells me how to display categories assigned to a post. How would I modify this code to display the terms from a custom taxonomy assigned to a post in hierarchical order?
2
votes
2answers
10k views

Display current taxonomy term when inside custom post type

Well, this should be pretty simple, however I couldn't find answer anywhere on the web. all answers I found were close but no exactly what I needed. what I need is to display just the current term of ...
2
votes
2answers
84 views

Prevent Selected Terms Rising to the Top

When you're editing a post and select a child category or term, and update, the selected terms appear at the top ( leading to potentially confusing situations where 'foo' 'foo' and 'foo' are selected ...
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
2answers
263 views

Limit tag cloud terms by date

I've been looking for a plugin that limits the tags dislayed in the tag cloud by date. Basically, I want all tags from a certain date forward. I've searched current plugins and haven't found anything ...
2
votes
1answer
626 views

How to hook get_terms() to only show count of posts that have custom meta

Here is what I have: A custom post type that has a custom meta value added to a post that stores the posts expiry date. When the post passes this expiry date it no longer shows on the site. This ...
2
votes
1answer
1k views

How to get the first term for the current taxonomy?

I'm using the following code to display the term for a specified taxonomy: $terms = get_terms( "book_review" ); $category = $terms[0]->name; However I want to display the term for whatever the ...
2
votes
1answer
178 views

When to use 'get_category_by_path' vs. 'get_term_by' to get category object from `get_query_var( 'category_name' )`?

I'd like to retrieve the category object from the category name, using the public query variable category_name, via get_query_var( 'category_name' ): $cat = get_query_var( 'category_name' ); There ...
2
votes
1answer
153 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
282 views

Glossary with Custom Post Type

I´d like to make a glossary. It should looks like: Index-Nav 0-9 | A B C ... M ... X Y Z B BMW M Mercedes ... ALL entries from index-nav (A-Z, O-9) should be visible in a <ul> and should ...
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
2k views

Generic taxonomy-term template page

because of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ? I've got 13 sub terms, do I need to create 13 ...
2
votes
1answer
330 views

Why does WP rename similar “term name”-slugs in separate taxonomies?

I have several custom taxonomies and within two of those ( Company Categories and Photographer Categories ) I have a term that is similar. The Company Category called Boudoir and the Photographer ...
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
99 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
131 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
615 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
2answers
395 views

Dropdown: Display terms from B only if has relationship with a term A selected

I've googling for a solution for this issue and found nothing: I have some posts from a Custom Post Type (Restaurants) and its taxonomies ('city' and 'cuisine'). Whenever I create a restaurant post, I ...
2
votes
0answers
209 views

How to display term description in empty terms archive?

I list all terms from a taxonomy, even the empty ones, but I found out that at least in 2010/2011 themes I got a 404-like message, the default seems to only display the term description when at least ...
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 ...
1
vote
3answers
3k views

Is there a way to import terms into Wordpress?

I'm tired of typing in lists of counries in my "Countries" taxonomies. What's a good way to bulk import a long list of terms into Wordpress ?
1
vote
2answers
512 views

get_terms with more than x post count

Is there an argument for get_terms which I can fetch terms that only have say over 2 posts associated with it? I have a terms page which lists all my terms for 'artists', the page is huge but a lot of ...
1
vote
1answer
257 views

Display empty taxonomy terms with get_terms()

I have a function setup as follows: <?php $terms = get_terms("wpsc_product_category"); if ( !empty( $terms ) && !is_wp_error( $terms ) ){ foreach ( $terms as $term ) { ?> ...
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
1answer
603 views

Operations with custom fields values in a loop

I have a foreach for displaying all the post in one taxonomy filter by terms. I have a custom field for display a numeric value. What I need, is to make two math operation with all the values of that ...
1
vote
2answers
236 views

Have a Custom Post Type index page display taxonomy items instead of posts

I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. "online ...
1
vote
2answers
220 views

Creating a function that receives the taxonomy terms that have been changed in a custom post type

Ive been looking into actions and hooks etc... from wordpress, but cant seem to do a very simple thing. I just want to execute a function whenever a post is updated, and within the function I want the ...
1
vote
2answers
180 views

Check if term is in a taxonomy?

Is there a function that does something like: is_in_taxonomy($term, $taxonomy) Where it returns true if $taxonomy has that $term. ???? Thanks!
1
vote
1answer
3k views

If on term-page -> get the current term?

I'm trying to write a kind of "breadcrumb" function in my "functions.php" I'd like to query if I'm on a term-page and if so I want to print the current term I'm in. By "term-page" I mean the ...
1
vote
2answers
446 views

What is the difference between terms and tags?

I am working on a problem to get the most recently used tags within the last 30 days. My current thought process is not working, so I am trying to come up with an alternative method. I came across ...
1
vote
2answers
291 views

How to list 2 taxonomy terms for a post, based on their hierarchy

I'm using get_the_terms to display 2 terms on a post, associated with the taxonomy "location". The terms are the suburb and the city. The location taxonomy is hierarchical so the suburb is a child of ...
1
vote
2answers
477 views

List Terms in Category

I want to list all terms of a specific taxonomy used in a category. Like I have a taxonomy called 'Manufacturer' and a category 'Shoes'. Each post in this category has a term like 'Nike', 'Adidas' or ...
1
vote
2answers
1k views

Fixing category count

Somehow my post counts are incorrect due to inserting rows via php. I have the following code to update the count, is it correct? global $wpdb; $result = mysql_query("SELECT term_id,term_taxonomy_id ...
1
vote
2answers
46 views

Display assigned terms with link

I want to display product assigned terms, wrapped in link/anchor MarkUp, in my sidebar on a page as a widget. I am not getting the correct tag URL. Code returns visited product URL instead of listed ...
1
vote
3answers
66 views

Exclude Taxonomy Terms from Template Via Back End?

I'm wondering if you can help me work through an issue or provide alt ideas. I have an archive displaying a list of custom tax terms in a grid view. My client needs to be able to turn on/off the ...
1
vote
1answer
153 views

display taxonomy slug from term ID

I'm trying to display the taxonomy slug from the term ID, thus my current code is like so: <?php $catinfo = get_category(array_pop(get_sub_field('sector_selector'))); ?> <?php print ...
1
vote
1answer
2k views

Why is my WP_Query not working when tax_query terms are an array?

I have an issue with a WP_Query for a site I'm building which has me stumped. This works as expected: $package_args = array( 'post_type' ...
1
vote
1answer
439 views

Handling duplicates with wp_insert_term()

I'm using wp_insert_term which works quite well Now I want some error handler for when using the same name. $term_id = wp_insert_term( $term, 'wpsc_product_category', $args ); if($term_id) {//my ...
1
vote
1answer
755 views

Does WordPress limit the length of slug names for Post Meta or Terms?

The WordPress Codex states the the Post Type Names and Taxonomy Names have a limit to the slug name. Register Post Type -- max. 20 characters, can not contain capital letters or spaces Register ...
1
vote
1answer
87 views

Add a term to an attachment submitted from front end

I have a front end post form where users can upload a file with their post that I save as an attachment using media_handle_sideload(). I need a way to add a term to that attachment so I can show a ...
1
vote
2answers
162 views

Strict tag list - user should choose only existing tags for posts

While selecting tags for the posts the user is able to create new tags on fly. For example we have the tag 'animal' but the user misstpye it as 'aminal' - and Wordpress creates it. In our blog the ...
1
vote
1answer
1k 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 ...