The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
24 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
19 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
30 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
57 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
400 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 - ...
0
votes
0answers
26 views

Trying to pull tag on image attachment for a containers class

So here is my query: <?php $page = (!empty($_GET['myp'])) ? $_GET['myp'] : 1; $per_page = 20; $base = get_queried_object(); // ...
1
vote
1answer
340 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, but ...
0
votes
1answer
836 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
237 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
353 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
135 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 ...
2
votes
4answers
8k 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
1k 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
874 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. ...