0
votes
1answer
28 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 ...
-1
votes
1answer
18 views

How to display a term of taxonomy

My doubt is how can I show a "term” of an specific taxonomy, the problem is that I have not found an applying example, just short code lines that don’t show me nothing at all. I want please the ...
0
votes
0answers
26 views

Get current terms info when querying by multiple taxonomy terms

I'm currently using the following in my archive template to create a menu of taxonomy terms and add a 'live' class to the term that's currently being queried. $termsA = get_terms('MYTaxA', array( ...
0
votes
1answer
38 views

Add current class to queried term on taxonomy term archive

I'm currently using get_terms to list terms of a certain taxonomy. I would like to add a class to the term currently being queried via the archive template. I tried putting together the below code ...
0
votes
1answer
43 views

How do I get taxonomy terms by ID in a specific order

How do I get taxonomy terms by ID in a specific order. Below is my code and I thought if I passed get_terms the arguments to with ID and post_in but I am not seeing the results I thought I should. ...
0
votes
1answer
53 views

Taxonomy term breadcrumb; how?

Given a taxonomy term (perhaps in a taxonomy*.php template) how to construct a breadcrumb going up the full ancestry of the term? Is there any shorter way other than a "brute-force" loop to query ...
0
votes
1answer
125 views

get_terms function not returning anything

This has had me baffled for days so any help would be appreciated. I cannot get the function get_terms to return anything. I've tried the following code in the index.php, single.php and page.php, ...
1
vote
2answers
153 views

get_terms that have custom sticky field checked

I was able to add a extra custom field, named sticky, to a custom taxonomy, using the wp taxonomy meta plugin, like this: function YOUR_PREFIX_register_taxonomy_meta_boxes() { // Make sure ...
0
votes
2answers
71 views

How to limit the number of terms (terms acts like categories)

Hello i have created taxonomy in custom post type that act like category. then i have created terms that acts like categories. i have create widget that show all terms from taxonomy. all works ...
1
vote
4answers
530 views

Count posts that have specific taxonomy term attached

When upgrading our portfolio I'm looking for something that shows the number of posts in a (current) category of a post type. Example: I have a category with 'features'. Each feature has it's own ...
1
vote
1answer
622 views

Use get_terms to get post_tags but limit to a taxonomy

So I'd like to get the top 5 post_tags by count. But I have an additional taxonomy that I use to further organize posts called Issue. So I want to be able to get the top 5 post tags used by posts in a ...
0
votes
4answers
1k views

show tags of custom post type ONLY

I have a custom post type with tags included as a taxonomy, I am trying to display a list of all the tags that are in the custom post type only. I initially used: <?php wp_tag_cloud(); ?> ...
0
votes
1answer
1k views

tax_query in get_posts() not working?

I'm trying to print out all the posts within every taxonomy for a custom post type called product (jigoshop products). So i get all of the taxonomies using $cats = get_terms('product_cat');, then i ...
1
vote
2answers
202 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 ...
0
votes
1answer
458 views

Display custom taxonomy attached to the post on post single page

I need to display the first custom taxonomy attached to the post on post single page. The custom taxonomy is similar to category attached to the posts. I need to display the first custom taxonomy with ...
-1
votes
1answer
1k views

Isotope Drop Down Categories Filter Function

I have a code in my functions file that I am using to generate a list of categories so that I can use isotope to filter the current page. However I need to know how to - How to make it a drop down ...
0
votes
1answer
209 views

ISOTOPE - Missing/Invalid Arguement Get Terms

I am trying to use the isotope plugin for sorting on my taxonomy page and even though I don't know much about how to set it up, I tried using some advice found on here. Wordpress and isotope ...
0
votes
2answers
297 views

Get terms in hierarchical taxonomy which are associated with page and are children of a parent term

I have a hierarchical custom taxonomy ("photos"), with 3 parent terms ("color", "location", "year"). Each parent term has several children terms. I have associated the "photos" taxonomy with pages and ...
1
vote
3answers
716 views

Using get_terms for custom taxonomy in functions.php

I`m trying to retrieve the names of taxonomy items and include them into a theme admin panel. function retrieve_my_terms() { global $terms; $terms = get_terms('taxonomy'); foreach ...
4
votes
1answer
181 views

Return only the custom sub-term for custom post type, do not echo term-parent

I've made a custom function that retrieves the custom taxonomy term for a list of posts in a query, and echos both the name and the link. Additionally, it also excludes listing a term if I specify the ...
1
vote
2answers
223 views

How to add terms to my tax_query based off of the current post

I need the terms in my tax_query to be the ones from the current post. I am trying to this by using a variable. The value of the variable is given by using the get_terms() function. The problem is ...
0
votes
1answer
746 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
114 views

Unable to get the Parent Custom Taxonomy Terms

I am unable to get the Parent Taxonomy Terms here is the code i am writing $myterms = get_terms( 'iqvis_event_category', array( 'parent' => 0 ) ); echo '<pre>'; print_r($myterms); echo ...
6
votes
2answers
2k views

get_terms by custom post type

I have two custom post types 'country' and 'city' and a shared taxonomy 'flag'. If I use: <?php $flags = get_terms('flag', 'orderby=name&hide_empty=0'); I get a list of all terms in the ...
0
votes
2answers
159 views

Echo used hierarchical taxonomies parent name

I want to echo my hierarchical taxonomies parents which I used in my posts. I've see answers about that, but no one didn't help me. To get all taxonomies, currently I use <?php the_terms( ...
0
votes
1answer
202 views

Taxonomy order exception for specific term

I want to make an exception for my custom taxonomy order. Sometimes you need to put "Other" option as last option but when calling taxonomies with "orderby=name", sadly "Other" term is not listing as ...
3
votes
1answer
95 views

Is there any difference between post in child term and child & parent terms?

This may be really obvious, but I can't find other documentation or questions about it. Scenario I have a directory of Businesses (custom post types). Each Business has a "Type" (custom taxonomy). ...
0
votes
2answers
2k views

Get Current Custom Taxonomy ID by Post ID

If I know the current post id that i have in the variable $pid I use $terms = get_the_terms($pid, 'custom_category'); How do I get just the term id/term_taxonomy_id if I var_dump $terms I see what ...
2
votes
1answer
416 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
958 views

How to order a taxonomy's terms numerically, from lowest to highest using get_terms

I'm using get_terms to output a taxonomy's terms, which are all numbers: For example: 4, 6, 8, 10, 12 How can I order these numerically, so they appear exactly as above? What I'm getting is ...
3
votes
2answers
911 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 ...
1
vote
2answers
453 views

get_terms problem : related articles

I'm trying to use get_the_term_list to catch the name of the current taxonomy of the page, and then use it with get_terms and a foreach method, to show the result of all the "elements" from the same ...
4
votes
1answer
564 views

get_terms() How many is TOO many?

Working on revamping a plugin of mine when I noticed that wp_count_terms() is not reflecting the same number as a call to count( get_terms() ) with the same $args passed. I'm pretty sure this is a bug ...