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

3
votes
0answers
44 views

How to get term link that crosses different custom post types?

In my WordPress project, I have several different custom post types and they all share a common taxonomy. I am in the final stage of the project and now is time to link all custom post types using a ...
0
votes
0answers
14 views

Taxonomy terms by post type and category?

I'm trying to return the terms of a taxonomy that is used by a custom post type in a specific category, I can return all the terms of the taxonomy but I want just the ones used by that post type and ...
0
votes
2answers
35 views

Saving custom term value to the database in new table

So I'm trying to save the value of a custom term to my database. The table is created as is the custom term. The code below outputs the text field onto my custom terms page but it just doesn't save ...
0
votes
0answers
13 views

How to get a single archive page to display my various custom post types respective terms?

Is there a way to make a single archive show the respective terms/categories of multiple custom post types ? So far i have been able to make use of a single archive.php to display my various custom ...
0
votes
1answer
21 views

Commas not displaying in implode

I'm trying to separate some taxonomy terms with a comma, but I can't see to get the commas to show correctly. Here's what I got: <?php $terms = get_the_terms($post->ID,'type'); foreach ( ...
0
votes
1answer
14 views

does wp_insert_term link the term to a certain post ID?

I'm using wp_insert_termto add a custom taxonomy like this: wp_insert_term( $_POST['city'], // the term 'property-city', // the taxonomy array( 'description'=> ...
0
votes
1answer
44 views

Exclude posts that only have the 'Uncategorized' category [duplicate]

I want to exclude posts that only have the Uncategorized category (i.e. category id 1), but if a post is (erroneously) categorised as "Uncategorized" but also has other categories, I want to include ...
0
votes
0answers
13 views

Child term duplicated after delete the parent of child

I'm sorry before. I want to add term with wp_insert_term function, I have created function like this: function tmd_set_default_app_term() { global $themename, $parent_term; ...
0
votes
0answers
20 views

Category list with subcategories and terms

I have a problem that I cant figure out myself. Maybe I'm going in a wrong way and thats's why it won't work. So I need a list of categories (custom post type "products"). I have some subcategories ...
1
vote
2answers
22 views

How can I find the taxonomy in edited_{taxonomy}?

How do I find out which taxonomy triggered the save? add_action ( 'edited_' . $taxonomy->name, 'save_taxonomy' ); function save_taxonomy( $term_id ) { $term = get_term( $term_id, $taxonomy ); ...
2
votes
1answer
31 views

what are terms and taxonomy and how they related to post and how these three are stored in database

I am newbie to wordpress. I want to understand terms and taxonomy in wordpress. My questions: 1. What are the terms and taxonomy in wordpress? 2. how terms and taxonomy relates to post and how post , ...
0
votes
2answers
22 views

Getting a taxonomy's thumbnail url

This is how I am currently trying: $taxonomies = array( 'product_cat' ); $args = array( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => ...
0
votes
1answer
28 views

add links to list of post terms

How do I change the function below so that it outputs a list if links rather than a string? The resulting html I need is <a href="#">term</a> <a href="#">term</a> <a ...
0
votes
1answer
37 views

Multiple terms not working on taxonomy

I need multiple terms support my WordPress theme - $boards = get_user_meta($user_ID, '_Following Board ID'); $pboards = get_user_meta($user_ID, '_Board Parent ID'); $paged = (get_query_var('paged')) ...
2
votes
1answer
40 views

Reduce / optimize calling of wp_get_object_terms() when generating permalinks

My theme runs a loop that does not require post terms to show. However Wordpress core runs the wp_get_object_terms function on every iteration. This results in unnecessary DB queries such as: ...
0
votes
1answer
42 views

Get_terms stopped working after WP 4.2

I just noticed on my site that the custom taxonomy terms are no longer out putting. I am only guessing that it's happened since the 4.2 update. Here is the php: $terms = get_the_terms( $post->ID ...
0
votes
1answer
28 views

Custom term templates

So, I did some research online but could not find a solid answer, so here I am. I am in need to make a custom woocommerce category page for a specific category. For example, I have a category called ...
0
votes
1answer
57 views

Add a custom variable to query page object

Is there a way to add a custom variable to the queried object? if (is_page()) { $q = get_queried_object(); $term_id = $q->term_id; } Here's some background on my setup. I have a page ...
0
votes
0answers
45 views

Display taxonomy terms, child terms and posts in a template

In a site that I am building I am trying to create a template which will display all my "product" custom post types along with their parent and child taxonomies in some hierarchical structure which is ...
0
votes
0answers
56 views

What to do with shared terms splitting in Wordpress 4.2?

I read about a possible break compatibility change in Wordpress 4.2 called "shared term splitting". I download the plugin from jjeaton (https://github.com/jjeaton/wp-find-shared-terms) that show you ...
0
votes
0answers
35 views

Custom post type term names with ampersand in the term name

Every time I think I've got a handle on WordPress it finds a way to baffle me. Recently we've been having an issue with not being able to attach term names with an & (ampersand) character in the ...
0
votes
1answer
67 views

Get all taxonomies for all post types

I would like to get all the available taxonomy for each (custom) post type. My aim is to list for each post type, each taxonomy like category, tag and for each of these taxonomy to get all register ...
0
votes
1answer
246 views

Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms

I am trying to build an advanced search form that allows users to select from two taxonomy based drop down menus. Each taxonomy drop down has taxonomy terms from which the user can select multiple ...
0
votes
1answer
40 views

wp_update_term not creating new unique slug

I want the slug to be recreated every time the term name is updated so it accurately reflects the name. wp_update_term(10, 'artists', array('name' => 'my new name')); The documentation ...
0
votes
0answers
34 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
45 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
28 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
17 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
46 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
55 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: &lt;strong&gt;test&lt;/strong&gt; ...
0
votes
0answers
34 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
72 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
20 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
118 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
55 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
19 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
147 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
25 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
53 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
39 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
117 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
35 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
130 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
47 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
42 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
25 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
153 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
62 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
52 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 ...