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

1
vote
2answers
34 views

Check if an array of posts has posts from a specific category

I have an $array that prints out to be as follows. Array ( [post-12] => 12 [post-160] => 160 ) What WordPress function could I use to check how many of the post ID's in the array belong to a ...
0
votes
2answers
308 views

What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?

I need to delete some postmeta when deleting taxonomy terms from the backend. Before deleting the term, I need to retrieve the postmeta's meka_key and the term id that is going to be deleted. Use the ...
0
votes
1answer
285 views

Getting taxonomy images to display on single-post with their terms

Having some trouble with taxonomy images plugin. I am on single-post.php and I want to display my post's taxonomy terms & the term's associated images. Ideally, I'd like the taxonomy description ...
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?
0
votes
2answers
454 views

Ordering Posts with Custom Taxonomy Terms Array

I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added ...
0
votes
1answer
550 views

Get post terms with hierarchical relationships

I'm having a hard time getting a set of selected terms in a custom taxonomy presented in a specific way. I have a hierarchical taxonomy 'places' and a post with the tagged terms: England (x) - ...
0
votes
1answer
315 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 ...
6
votes
2answers
130 views

Get The Post Type A Taxonomy Is Attached To

Being given a taxonomy or term, is is possible to pull any / all post types the taxonomy is attached to? For example, knowing the built in taxonomy category or being given a term in the category ...
1
vote
1answer
336 views

non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue

I registered a non-hierarchical custom taxonomy ('property_features'). There is a checkbox for every terms of this tax in a custom meta box on the edit-screen. All terms are displayed and all terms ...
0
votes
0answers
31 views

Getting a term_id given a term_taxonomy_id?

Basic question: If I have a term_taxonomy_id, how can I get the term_id? I thought I could get the term object by get_term_by('term_taxonomy_id',$ttid,'my_custom_taxonomy'), but WPML localizes it - ...
0
votes
2answers
602 views

Use get_term_children to get the sub category of a parent category for the current post

In my WooCommerce theme I've created a root category: 'Brands' then for each product I've added it's brand as a sub category to the 'Brands' parent category. On the product page I want to display the ...
3
votes
1answer
631 views

Control term order on a per-post basis

I have a taxonomy in which term order matters, but varies from post to post. So I want to be able to set the order that terms are displayed in on a per-post basis: My first post | Tagged: Apples, ...
0
votes
1answer
293 views

get_term and get_term_by returning null or false eventhough the term exists

I am trying to use the action hook delete_term, delete_$taxonomy, among other hooks that delete a term but they are presenting the same issue. For example: 1234 is an existing term in the favorite ...
2
votes
2answers
9k views

Display all the subcategories from a specific category?

I need to show all subcategories using $product_category = wp_get_post_terms( $post->ID, 'product_cat' ); actually I use: <?php global $post; $terms = get_the_terms( $post->ID, ...
0
votes
2answers
286 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? ...
8
votes
6answers
11k 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 ...
0
votes
1answer
338 views

Get all attachments by custom taxonomy - term

I want to make custom taxonomy (gallery) and terms (name1, name2, name3...) Add images into media tab and then retrieve all images from same term. Look like simple task, but I cant manage it. I ...
1
vote
1answer
662 views

How to order get_term_children output by alphabetic order

The following creates drop-down lists of my custom taxonomy children, but the order of the output seems to by creation date, not by alphabetical name. I tried adding orderby to the array with no ...
1
vote
1answer
563 views

Display posts from an author using search parameters (not author template/query_posts)

Is there a way to retrieve a list of all the posts by an author using search (example: ?s&author=xxx)? I can't use query_posts or author template (don't ask why, take it as a condition). And it ...
1
vote
1answer
766 views

Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?

I have a custom post type with a custom taxonomy (to show some "best practice" examples on my website). On the single-post-page (single-bestpractice.php) I wanted to show all the terms (categories) ...
0
votes
1answer
19 views

List Terms by category

I have a custom taxonomy called portfolio-type. The terms = post_type is portfolio and category is portfolio-type I'm trying to fetch related post of the same category of current post <?php ...
0
votes
1answer
274 views

list taxonomy terms in current post / current category

i need to display taxonomy terms in a custom post and also in archive / category page of that post type. terms must be from current post or current category ...
1
vote
1answer
633 views

Some custom taxonomy child terms not showing in admin. Caching problem?

I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies. I successfully created my postype and hierarchical taxonomy and ...
0
votes
1answer
25 views

How can I display a div ONLY if it is not a certain term page

Ok so I have two Custom Taxonomies of "Types" and "Countries" with dozens of terms. I basically use the terms of "Types" and "Countries" as a filter for my products in my taxonomy.php Now Those 2 ...
0
votes
0answers
23 views

Get posts by current taxonomy term child term

I am trying to create two different wordpress loops, each one will be using a custom taxonomy called 'walls'. Loop one: get posts by child term of the current pages term. Loop two: get posts by all ...
15
votes
8answers
9k 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
1answer
285 views

How to prevent new terms being added to a custom taxonomy?

I've created some custom taxonomies using register_taxonomy, but I want to prevent new terms from being added. I noticed that there is a 'capabilities' argument available in register_taxonomy, is that ...
0
votes
0answers
38 views

dynamicaly populate a WP-Query Argument

Hi Ive the following code for a single Taxonomy term template, its all working fine, however i'd like to adapt it somehow to get the argument 'term' dynamically, so get the current term, update the ...
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 ...
0
votes
0answers
36 views

If page is a taxonomy do X, if is a term, do Y

I am having an issue with a template for a site, I need to be able to check if the page is a taxonomy archive or is a term page My code: $term = get_term_by('slug', get_query_var('term'), ...
0
votes
1answer
24 views

Query pages by child term

I cannot seem to get this to work, I have tried everything I can think of and spent enough time googling, to get me to seek help elsewhere. I need to query pages in a loop, using the same taxonomy as ...
3
votes
3answers
11k 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 ...
0
votes
1answer
26 views

Custom Wordpress Excerpt within terms

Is it possible to show an excerpt of the place in the feature where the search (term) result/hit is? Thanks
0
votes
2answers
46 views

get_terms: determine if taxonomy term has children

I'm looking to determine if a taxonomy term has children. See the below markup and I'll explain what I mean: <?php $terms = get_terms("wpsc_product_category"); if ( !empty( $terms ) && ...
2
votes
1answer
616 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 ...
3
votes
1answer
41 views

Modify Term Update Redirection

Whenever I update a term it currently redirects me back to the edit-tags.php page for that taxonomy, the term list. Is it possible to instead of redirects to the term list to instead bring me back to ...
0
votes
0answers
30 views

Content instead Excerpt on term

Is it possible to show limitation (dynamically) of the contents near the search term value. I knew how how to using excerpt, but what I am talking about is, search result content limitation character ...
0
votes
2answers
51 views

get taxonomy terms for parent and child

I have a function set up that prints the taxonomy term name and slug for every products-category taxonomy term present. This works great, but it's just displaying them alphabetically like so ...
0
votes
1answer
26 views

Accessing Post ID Within Loop

I have a page called Products with an ID of '8' Within that, I have the following template part <?php get_template_part('loop', 'feed-products' ); ?> Then within that file, I have this ...
0
votes
4answers
1k views

Get post by term from custom taxonomy in another blog on the network?

I'm having trouble getting post by term in a custom taxonomy I have set up. The catch is this is multisite and I'm getting this data from another blog on the network where the taxonomy is registered. ...
1
vote
1answer
260 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 ) { ?> ...
0
votes
1answer
34 views

query multiple taxonomies

I have a function set up to show 'Similar Products', i.e. showing products that share the same products-category taxonomy term. This works great but I want to narrow the function even further and make ...
1
vote
1answer
25 views

Custom query to get terms from post ids

I want to get the terms object by given posts ids. I don't know much about sql, and this kinda complicated for me. Here is what i tried: global $wpdb; $taxonomy = 'category' $term= ...
1
vote
1answer
289 views

Determine Term depth

I'm looking to be able to find the depth of a term within it's hierarchical tree. Produce -- Vegetables ---- Carrot ---- Onion ---- Celery -- Fruit ---- Apple ------ HoneyCrisp ----Orange Produce ...
0
votes
0answers
10 views

Get List of Taxonomy terms used in another taxonomy term [duplicate]

I'm using WooCommerce for WordPress powered cars store. I've registered new taxonomy called "car types" which contains terms like: "new cars" and "used cars". I want to query the "product_cat" terms ...
3
votes
3answers
189 views

I have a term_taxonomy_id — is there an API call to get the taxonomy?

Issue: I have the term_taxonomy_id, I do not have the taxonomy name, I want to retrieve the term object without doing a direct database query. Thoughts: Well the API docs for get_term_by say that ...
1
vote
2answers
260 views

Show posts from two or more custom taxonomy terms

I want to show posts which are filed 2 or more custom taxonomy terms. For example, I want to show the posts from custom post type "Classified" and filed under Books and House terms. The code below ...
0
votes
1answer
59 views

If product is in sub-category show code

This code works with categories but not with child sub-categories. How can I make it work a child category that is not in the url (slug)? global $post; $terms = wp_get_post_terms( $post->ID, ...
0
votes
0answers
49 views

Get a “featured” taxonomy term using a custom field checkbox

I'm using Advanced Custom Fields to add a true/false checkbox to the taxonomy management screen. I want to show (a) the most recent term in the taxonomy that (b) has the checkbox selected to true. I ...
0
votes
0answers
79 views

Issue on Counting CPT's Under Taxonomy Term

I am using this code to count number of Custom Post Type $tax_terms = get_terms($tax, $args); foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . ...