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

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'=> ...
6
votes
2answers
537 views

Is There a Difference Between Taxonomies and Categories?

I've been reading the codex for WordPress closely and am confused about the vague definitions between what a Taxonomy is and what a Category is. For that matter, term is also a word that is used in ...
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 = ...
0
votes
1answer
100 views

Checkboxed term search

Anyone know if I can make a checkbox-list with all terms from a taxonomy, and search for the posts belonging to the checked terms? Listing categories in the checkboxes also would be a bonus!
3
votes
1answer
659 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 ...
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 ...
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
1answer
489 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 ...
3
votes
2answers
502 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 ...
2
votes
1answer
297 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? ...
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 ...
0
votes
1answer
303 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 ...
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
5answers
592 views

How to associate an image with a term taxononmy and publish it on frontpage?

I couldn't find the solution anywhere else, so I believe is a valid question for this website. I think my problem is divided in two parts. I created a custom taxonomy called "Type" and within it, I ...
0
votes
3answers
504 views

Custom Post Type Archive Template

I have similar problem to this one: Custom Post Type Template - Archive I have a WordPress custom post type called coupon. I try to assign the template to it by using archive-coupon.php, but it goes ...
15
votes
8answers
8k 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 - ...
3
votes
3answers
10k views

get_posts assigned to a specific custom taxonomy term, and not the term's children

Say I have the following taxonomy terms: Term 1 Term 1.1 Term 1.2 Term 2 Term 2.1 How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or ...
5
votes
2answers
635 views

Is there a way to 'Lock' a Taxonomy?

I was wondering if there was a way to prevent the addition of new categories into a taxonomy, essentially 'locking' the taxonomy. I'm programatically registering a taxonomy and filling it with terms ...
4
votes
6answers
6k views

Custom order of terms for custom taxonomy in admin and website

I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
0
votes
1answer
2k views

Update term count using a callback function

With the wp_update_term_count_now, how can I use the update_count_callback to specify my own count. I need to include counts from another database that the current database category is able to ...
3
votes
2answers
1k 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 ...
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
5k views

How to only list the child terms of a taxonomy and not their parents?

I'm creating an age select menu in the admin, populated from a taxonomy of age. The taxonomy is hierarchical as follows: 18-25 (parent, ID 183) 18 (child) 19 20 21 22 23 24 25 26-30 (parent, ID ...
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 ...
1
vote
5answers
10k views

How to get current term in my custom taxonomy in WordPress?

I need to display the current term in my custom taxonomy in a single post. example: My custom taxonomy is products and term of them is product-1, product-2 and products-3. My post is assigned to ...
0
votes
2answers
221 views

Want wp_get_post_terms return in arbitrarily order, how to do?

Function below returns in alphabetical order and not, as wished, in arbitrarily order. Is it possible to -not- return in alphabetical but in exact order as given in the array? ...
0
votes
1answer
969 views

show term description instead of list terms of custom taxonomy

For a custom post type (review) I have enabled a few custom taxonomies. One of them is author rating and for that I have added images to the description field of the terms in the taxonomy (1 star to 5 ...
0
votes
1answer
3k views

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( 'catalogs' ); $mycatalogs = array( -1 => 'Select a catalog' ); if ( $catalogs_terms ) { ...
3
votes
1answer
2k views

How to get_term_children output in alphabetical order?

How do i get output of this in alphabetical order <?php $termID = 5; $taxonomyName = 'area'; $termchildren = get_term_children( $termID, $taxonomyName ); echo '<ul>'; ...
2
votes
1answer
41 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
4answers
5k views

How can I remove links from the function “get term list”?

<?php echo get_the_term_list( $post->ID, 'people', 'People: ', ' ', '' ); ?> returns something like this: People: <a href="person1">Person1</a>, <a ...
1
vote
2answers
249 views

Count posts for each taxonomy term for each month

Cannot figured it out... I need to count how many posts there are for each taxonomy term form each month.
1
vote
1answer
279 views

How to edit/remove a term that's in multiple taxonomies?

Some of the terms on my site appear with the same exact slug, in multiple taxonomies. For example: 'education' appears in both the 'department' taxonomy and the 'topic' taxonomy. Now, I can't seem ...
1
vote
1answer
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 ...
0
votes
1answer
323 views

has_term() does not return when term is assigned post?

Ok, I have an archive loop. In this loop I have this... <?php if ( has_term('race') ) { ?> <strong class="archive-event"><?php the_title($event); ?></strong> <?php } ...
0
votes
1answer
58 views

Multiple taxonomies & terms (no hyperlinking) in 1 function [duplicate]

I am trying to make a function but (because the lack of my knowledge) can't figur out how to do. The codex shows an example for using 1 taxonomy and 1 term and as output nice showing 1 Taxonomy / 1 ...
0
votes
2answers
417 views

When/why does '$query->get( 'tax_query' );' return empty?

First the code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( 'post_type', array( 'post' ) ); ...
0
votes
1answer
182 views

Query set using tax_query with relation 'OR' modifies category object?

(Update: Please see the edits far below.) The code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( ...
0
votes
1answer
370 views

Displaying custom post type by first letter through custom taxonomy

I'm trying to make a page on my WordPress website to display all kinds of food through 26 loops. Every loop has to loop a letter of the alphabet, and on top of the page I have links that will link to ...
0
votes
1answer
97 views

Is altering a default WordPress database table update safe?

I want to add some table columns to the wp_terms table. Is it safe to use the dbDelta function with a modified CREATE-MySQL query for this? Or will I run into problems in the long turn? Is it update ...
0
votes
1answer
281 views

get multiple values from $_GET from multiple checkboxes

I'm creating a form that loops through all the terms of a taxonomy. Multiple terms can be selected and they get passed in the url. I'm trying to get all the terms on another page but I'm only able to ...
0
votes
2answers
140 views

Get used terms by an author as array of strings

I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya'). function ...
0
votes
2answers
510 views

Automatically Assign Parent Terms When A Child Term is Selected

I have deep hierarchical taxonomy and I want to have all parent term assigned when I select a child term. I need it for category structure on a online listing/classified site. CPT name: product ...
0
votes
4answers
271 views

100+ terms in any taxonomy slows down post updates?

I'm making a fairly large (for me) e-commerce shop with Woocommerce. The shop has ±1300 products and will be going to ±2000 products. There are also ±2500 Product Tags. I've had speed problems on a ...
0
votes
1answer
974 views

How to get the top most term (top ancestor) of a custom taxonomy child term?

I need to get the topmost term (top level ancestor) of a taxonomy term. Suppose the following term hierarchy: North America United States New York New York ...
0
votes
1answer
228 views

Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?

I added the code below and successfully changed my CPT slug for the taxonomy terms. My blog permalinks are /article/%postname% in case you wonder, and I'd like to keep it that way, so no clashes with ...
0
votes
2answers
693 views

Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function

Check the line; list($term_id,$taxonomy_id) = $result in the code snippet below. ( towards the bottom ). Why am I missing the term_id & the $taxonomy_id when I echo their values? Aren't ...
0
votes
1answer
725 views

Showing posts by collection of specific terms and texonomy

i have a custom post type name 'business' and taxonomy 'business-category'. now i want to show posts for some specific terms suppost, term1, term2, term3 etc. The following code is working for me but ...