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

0
votes
0answers
12 views

Using term_group to order custom taxonomy

I have a few CPT's that use custom taxonomies. The idea is to group things on a page by the taxonomy. My problem is I would like to order the groups on the page similar to menu_order in my get_terms() ...
0
votes
0answers
18 views

How to pass taxonomy terms to WP_Query along with $args?

I created a cpt and custom taxonomy associated with it. Lets say custom taxonomy name is Sports. I added terms to it - football, basketball. Now, i want to fetch post titles tagged under football ...
1
vote
1answer
11 views

conditional statement based on terms

I was wondering if someone could help me out. I have created a custom query to retrieve in a custom single.php to retrieve posts which have the same custom taxonomy term and display them. here is the ...
0
votes
1answer
15 views

Missing term_id value

For some reason the get_term_by function does not return a value for term_id. It will return the name of the term but not a value for term_id. I'm trying to get the term_id of a category basically. ...
0
votes
1answer
29 views

Custom Post Status & Taxonomies

I have successfully registered my custom post types, custom post statuses and my custom taxonomies/terms. All is working fine but... It seems that both the 'categories' column within the custom post ...
0
votes
1answer
15 views

Add HTML to Term Description

I'm trying to add ( using wp_editor ) an HTML Term Description without a pluign. Whenever I try and spit out the data I get escaped HTML back: <strong>test</strong> ...
0
votes
0answers
11 views

How to make a category an alias of another category?

The codex page for wp_insert_term states that you can Optionally marks it as an alias of an existing term. But I cannot find anywhere in the admin area where this is reported or can be set. I ...
-1
votes
1answer
32 views

How can I get parent term from a child term

I have a custom post type and a taxonomy, when adding a post if I select a child term and not the parent term then I cannot use get terms as the parent term wont be in the array as it wasn't selected ...
0
votes
1answer
19 views

CTP - check for value inside objects

I have registered a CTP which can add a new plant and user can tick which months it can be planted (february, march and april for example). Now, I need to display it on the page but with all months ...
0
votes
1answer
36 views

How to Get Current Custom Post Type Associated Taxonomy Term

I have a single.php file like below <?php get_header(); ?> <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); echo '<div">'; ...
0
votes
1answer
39 views

Match and Merge Terms in Different Taxonomies

I have some author names held in two different taxonomies where the terms are formatted in two different but overlapping ways. There are about 400 terms in each taxonomy, associated with roughly 700 ...
0
votes
0answers
14 views

How to use one taxonomy for different needs?

I have a taxonomy called "Names" (like tags) where I store people names and for example, I have a custom post type called "Photography" where I want to tag people who appears in each photography and ...
0
votes
1answer
35 views

Get only one product category woocommerce

I have to get and show only one category name from a product. I have almost read everything and tried everything. <?php $term = get_the_terms( $post->ID, 'product_cat' ); foreach ($term as ...
0
votes
1answer
12 views

modify strip_tags function to use term slug instead of term name

I have a small function to get post categories from a custom taxonomy and modify their url, but now I have multi-word categories I need to modify it to use the category slug instead of just the ...
0
votes
1answer
27 views

Get list of CPT posts in *current* post's taxonomy term

I've seen dozens of similar but not quite the same questions - It seems easy enough to do a wp_query and get a listing of posts in a given CPT, and sort by a given taxonomy term. However, what i can't ...
0
votes
2answers
23 views

Custom Taxonomy Terms in Menu lead to which page?

Hello All I was wondering if someone could help me out. I have created a custom post type along with a custom taxonomy. In this custom taxonomy I have created custom terms through the wp dashboard. I ...
0
votes
1answer
49 views

Custom query - get_the_terms not work

I want to to show my customer works in a slide This is my query to show these works. I want to obtain the term of the taxonomy "idm_real_tax" for each custom type record. $query = new ...
0
votes
0answers
18 views

Should update a term, but new one is created instead

I have a piece of code that should update a term in a custom taxonomy, when custom post type's title or slug is updated. However, instead of updating a term, a new one is created. CPT: collection ...
0
votes
1answer
27 views

Find terms in a custom taxonomy based on the hirearchy

I have a hierarchical custom taxonomy were individual term names could be repeated in different level but not in a single hierarchical path. Let me explain this using an example News News > ...
0
votes
1answer
34 views

List subcategory on taxonomy term page

On WooCommerce I am using the archive-product.php template page. I want to show a list of the sub-categorys from the displayed category. So as the user changes category the list of subcaegories will ...
0
votes
1answer
30 views

Term specific featured post on taxonomy archive pages

I am trying to find a way to display a per term featured post on taxonomy archive pages. So say you navigate to url.com/my_taxonomy/my_term it should show the featured post of my_term above the ...
0
votes
1answer
19 views

Hierarchical list of custom taxonomy terms

I have a custom hierarchical taxonomy. I don't know how many nested terms will be in each term. What I want to do, is to list all taxonomy terms hierarchically no matter how deep each term is nested. ...
0
votes
0answers
14 views

display link depending on CPT taxonomy term

I have created a CPT named "products" with taxonomy "range" with some terms: engine-oil, grease, brake-fluid, etc I need to add a download link to the product page display depending on its term. for ...
0
votes
1answer
49 views

Related Posts by taxonomy using Advance Custom Fields Plugin

I’m trying to list related posts using taxonomy with the Advance Custom Fields plugin. I’m using the following code below from the docs that links to all the posts in the taxonomy, but is it possible ...
0
votes
2answers
39 views

Get the ID of category page with or without any posts

Is there a better way to get the category ID that may or may not have any posts assigned to it? Currently im using the following code that resorts to parsing the page url, and getting the category ID ...
0
votes
1answer
24 views

Double slash in the_terms URL

I recently moved a parent category and its children from the default categories taxonomy to a new custom taxonomy. The data moved over just fine and posts are properly associated with the company name ...
0
votes
1answer
104 views

Sorting terms individually for each post

I have a custom taxonomy named author containing multiple terms. The default output order in the front end is alphabetically. But I like the authors to be ordered individually per post, e.g. First ...
0
votes
0answers
13 views

adding static page under term

How do I create a structure like this on wordpress http://sample-site.ph/archives/school/arts-and-sciences/gallery shool:taxonomy arts-and-sciences:term gallery: a page i want to add as a child of ...
0
votes
1answer
20 views

How can I get 3 different taxonomy type terms in a div class element?

I have this situation where I need to filter specific post type posts by its taxonomies (there 3 different ones) and since I am using Isotope, I need them in my class element. I already made it work ...
0
votes
1answer
66 views

get_terms() returns an empty array

I've read all the posts about displaying terms of a custom taxonomy and it's still not working. Ok, so here's the code: <?php //part of template-offer.php $taxonomy = 'brand'; $term_args=array( ...
0
votes
0answers
25 views

Fetch posts list from fist CPT taxonomy term and list under 2. CPT

I have two custom post types registered. Custom Post Type: PUBLIKATIONEN with the two custom taxonomies LISTEN and AUTOREN Custom Post Type: AUTOREN Both have archives. With: <?php echo ...
0
votes
0answers
25 views

How to limit the number of posts assigned to a custom taxonomy term

Out of curiosity, how would I create a custom taxonomy term that can only have one post assigned to it at a time? Say I want to create front page for my "articles" taxonomy. I usually create a term ...
0
votes
1answer
16 views

How to query if meta_key does exist or not?

Good day, I am trying to negate my query to show all instead except for a post with a custom field of file gallery. 'meta_query' => array( array('key' => ...
0
votes
1answer
26 views

Create an additional template page for every term taxonomy

Good day, I am trying to add a gallery page for my website by term-taxonomy, example I have a custom type named "School" and it has 3 terms which are "grade school, highschool and college" and I ...
0
votes
1answer
20 views

How to call a custom taxonomy term name inside a function?

With the following function, the content of another page is included into a page template, which is working fine: // add content of another page function show_post($path) { $post = ...
0
votes
1answer
60 views

Get current post's nav menu name (term name)

I want to get the nav menu name by the current post ID. After hours searching in my database I found out that navigation menus are basically just terms of the taxonomy 'nav_menu'. But for some reason ...
0
votes
1answer
105 views

taxonomy/category term in URL slug irrelevant for post?

so I've got a nice hierarchical system working involving custom post types and taxonomies. (see Custom post types, taxonomies, and permalinks for reference) So if I have a post with ...
0
votes
1answer
29 views

How to get several fields from wp_query?

I'm going to get several fields from wp_query result. I know about wp_list_pluck() function, but it accepts only one field paramether. How to get several ones if I'd like to take several parameters ...
0
votes
0answers
31 views

Translate SQL query to wp_database with JOINS into wp_query

StackExchange members! It's so happened that I'm using straight SQL queries in my application. I'd like to rewrite it and use WP_Query, but, unfortunately, I have no idea how to translate, let's say, ...
1
vote
2answers
68 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 ...
6
votes
2answers
178 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 ...
0
votes
0answers
130 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
1answer
22 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
82 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
58 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 ...
0
votes
0answers
45 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 ...
0
votes
0answers
41 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
31 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 ...
0
votes
2answers
265 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 ) && ...
0
votes
1answer
29 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