The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
28 views

wp_get_object_terms sql query equivalent

I have a problem in retriving a term from my theme. I found this query set the value I need, but I don't know which table is reading. Which would be the sql query equivalent of wp_get_object_terms?
0
votes
1answer
289 views

Get child terms of current term of the current post

I have custom post type "product" and taxonomy is "product_cat". There are two child terms -Music and videos. Under Music i have two more child terms albums and single. Now when i go to music category ...
0
votes
1answer
41 views

Same taxonomy for different object types

Starting with WP 2.3 we can do this: register_taxonomy('custom_taxonomy', array('user', 'post', 'link', 'comment')); Those are different object types that belong to different tables and hence can ...
0
votes
1answer
86 views

Get a list of categories ids

I'm working on a portfolio with filters based on custom post type. That filters must display only categories for the posts that are displayed in the portfolio, since user can specify them by id in the ...
-1
votes
1answer
251 views

Display Categories Assigned to a WooCommerce Product

I am using WooCommerce with SuperStore theme. In meta.php file is this line, echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, ...
0
votes
1answer
159 views

Hide echo of no categories from get_object_taxonomies

The following code works perfectly to show all the categories for a custom post type. However when there are no categories it echos 'No Categories'. How would I remove this? ...
0
votes
1answer
104 views

Removing a taxonomy term

There is a Wordpress function called wp_remove_object_terms that unfortunatly doesn't seem to work. I am trying to achieve the same ends using the following $post_terms = wp_get_object_terms( ...
1
vote
0answers
113 views

wp_get_object_terms(): count relative to passed IDs?

I know when you wp_get_object_terms() you get a "count" member variable for each term object returned, but that "count" is what's in the $wpdb->term_taxonomy table in the database, it's not ...
0
votes
3answers
2k views

How to order the get_categories result

I read the documentation of the codex but i can't order the get_categories() result just like parent,childrens. I have these kind of categories' three: -Events - Music - Culture - ...
1
vote
1answer
632 views

Order terms by term_order

Context Post Type: Resources Taxonomy: Media Type, Term: Audio Taxonomy: Series The following code displays a unique list of the custom taxonomy "Series" I want to order the list by term_order, ...
0
votes
1answer
1k views

wp_get_post_terms Order by not working

wp_get_post_terms Order by not working My code is here query_posts(array('post_type' => 'product','post__in' => $product_ids,)); while (have_posts()) : the_post(); global $post; $args = ...
0
votes
1answer
284 views

Get object terms with no children?

Others have asked how to only get parent terms, but I need to get the deepest term for the post of a specific taxonomy. Is there a way I can only get terms where the number of children = 0?
3
votes
2answers
2k views

wp_get_object_terms() to get a list of all the terms attached to all the posts in the current query

How can I use wp_get_object_terms() to get a list of all the terms attached to all posts in the current query? For example, for the current query I want to get an array of the terms from the "Alfa" ...
0
votes
1answer
427 views

Deleting terms from the Wordpress wp terms table

what wp function do i use so that I can delete a term without worrying about the related tables such as wp term relationships and wp term taxonomy? Also if a post has a relationship to the deleted ...
0
votes
1answer
144 views

Modify my code - which takes the first sentence of the post and use it as a h2 tag - to work outside the loop

My code takes the first sentence of a post and places it's content inside a variable. The problem is it works only inside the loop. I need help making this code outside the loop, becouse I want to ...
3
votes
5answers
12k views

Get the the top-level parent of a custom taxonomy term

How would I get the top-level parent of a given term? I am using wp_get_object_terms to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' ...
0
votes
1answer
2k views

Proper use of wp_get_object_terms

Summary: How can I get the name and the permalink of the object returned by wp_get_object_terms()? Detailled: I created a custom post type called "ge_zielgruppe" and a taxonomy called ...
2
votes
2answers
2k views

wp_get_object_terms - How can I order the resulting array by hierarchy?

I'm returning a custom hierarchal taxonomy via wp_get_object_terms. The trouble is that the results are being ordered by name or count, neither of which are proving reliable. (I'm using a custom ...
0
votes
1answer
951 views

Why does wp_get_object_terms add a period after terms are output?

I'm using the following line to output an unordered list of taxonomies and their associated terms for a custom post type. The only problem with it is that a period gets added after the term. ...