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
1answer
78 views

How to get a post's associated taxonomies and terms in wp api v2

I am using angular to get a list of posts back from the post endpoint for the wp api. These posts have different taxonomies and terms associated with them. I want to use angular's search filters ...
0
votes
1answer
110 views

term_exists() returning NULL on term that exists

It seems that term_exists() is returning NULL for a term that already exists: $name = "כל האזורים" $taxonomy_name = "geographictermsisrael" $args = array("slug" => "everything", "parent" => 0) ...
1
vote
2answers
60 views

Display certain amount of posts on taxonomy archive page

I have a taxonomy archive page where I display everything under the term 'techno' I want to be able to limit this to 20 posts to a page until it paginates. At the moment it displays 10 on one page and ...
0
votes
0answers
33 views

Get template part using a custom taxonomy term

I've been using the following code to get a template part based on the parent term. It was working fine until I updated WordPress to v4.4 earlier today. Since updating if there is also a child term ...
1
vote
1answer
73 views

I want to loop through Woocommerce Product Catogories and show them in dropdown

I want to loop through Woocommerce Product Catogories and show them in dropdown. I have tried almost every piece of code available on internet but seems that they are not working for me. I'm very new ...
0
votes
1answer
39 views

Urls in Custom Post Type work for Terms but not for its Taxonomies

I have created 12 taxonomies for a custom post type and a few terms. On creating new post it looks like this and that is perfect - Taxonomies with terms I have: archive page - url is ...
0
votes
0answers
95 views

Get term link of shared taxonomy between multiple post types

Let's say that we have three custom post types: museum, theater and restaurant that share the same hierarchical taxonomy: location Up till now I have 3 different urls for each of cpt archive pages: ...
0
votes
1answer
130 views

get_term_by works but get_terms doesn't?

I currently have a Multisite with 2 sites. From the secondary site get_term_by() works to retrieve terms from the primary site, but get_terms() does not. I'm using switch_to_blog(1); but I get ...
3
votes
1answer
64 views

Get_term_by only returns one item from array

I am trying to retreive a term id based on the term name using the "get_term_by" function that is build into Wordpress. However, this function only retrieves one item from the array that i get them ...
1
vote
1answer
28 views

Faceted search with WP-API data

I have this site - where I have a post type called listings with a number of custom taxonomies and terms. - http://scd.blaze.wpengine.com/ If you choose a region it then shows you listings that are ...
0
votes
0answers
38 views

how to add custom taxonomy terms to main rss feed?

I'm wondering how to add custom taxonomies and their terms to the main RSS feed in WP 4.4. I've tried: function myfeed_request($qv) { if (isset($qv['feed'])) $qv['taxonomy'] = array( ...
6
votes
1answer
136 views

What is wp_insert_term “alias_of” arg for?

I currently put my hands into WP taxonomy and terms to find solutions for my project. I knew that it's not possible to have same terms slug when creating a term with wp_insert_term in one Custom ...
1
vote
0answers
49 views

Insert term and child term from frontend

I have this taxonomy: "free", and I want to insert new term (ex: Season) and then insert a child to this term (ex: episode) in the same form. Taxonomy "free" Add new term: ex: Season, and then add ex: ...
9
votes
1answer
367 views

Need a simple but complete example of adding metabox to taxonomy

Now that WordPress 4.4 is out, we can start using the new awesome term meta functions! Still, there seems to be no simple tutorial on how to add a basic text field to a Taxonomy. I tried to adapt ...
3
votes
2answers
266 views

wp_insert_term auto unique name

When creating a new term in a custom taxonomy with wp_insert_term, i've noticed that name should be unique. I get a wp error message if it is not : A term with the name provided already exists with ...
1
vote
1answer
124 views

has_term not working

I've been scratching my head all day with this one. I'm trying to use has_term but it just won't work. I do get this notice but I'm not 100% sure it's related. I've also tried is_object_in_term() but ...
1
vote
1answer
111 views

Getting WooCommerce product related child categories

I am completely stuck on what seems to be an easy thing. I hope you can help me with it. Each WooCommerce product will be added to one "car brand" child and one "car model" sub-child category of main ...
0
votes
2answers
72 views

How can I reduce amount of ifs and else ifs in this specific block of code?

I have some code in my loop that will determine the term in my custom taxonomy, if it's a specific term, it will output a specific image. <?php if( has_term('10', 'review-score' ) ) { ?> <a ...
0
votes
0answers
63 views

How can I allow users to set term_order for custom taxonomy in admin?

I am able to sort a list of (custom) taxonomy terms on the front-end calling get_the_terms() with the help of the following filter function: /** * Sort custom taxonomy by term_order * * @param ...
0
votes
0answers
18 views

Is there a way to sort posts by taxonomy terms? [duplicate]

I was wondering if I could sort posts at all by taxonomy terms? I've read that I can't, but I'm not too sure about that? If so, how do I go about doing so? Sorry for the rather short question. I ...
3
votes
1answer
119 views

Is there a way to set singular/plural labels for taxonomy term names?

Let's says I have a taxonomy called Types. I know I can have a singular name when registering the taxonomy... so I could just set the singular label to Type. But is there a way to the same/similar ...
0
votes
1answer
165 views

Invalid argument supplied for foreach() in search.php

I'm using this code on a search.php template to display search results, posts are formatted differently using a template part depending on the post term. This method works great on the index.php but ...
1
vote
0answers
24 views

Show child terms of current term of the taxonomy

I have some taxonomies (such as product, articles &...) and any taxonomy has some terms (Eg for product: mobile, book & ...), and any terms has some child terms (Eg for mobile: iPhone, ...
1
vote
1answer
79 views

get_terms orderby numeric

I am trying to order my terms numeric. But the problem is that nog every term is numeric. So I have the following terms (check image below) which some of them are dimensions and some are others. As ...
0
votes
0answers
17 views

Getting Post Tags From Certain Categories

The site I am working on has about 4 different post categories. I need to output a list (unordered) of tags in that category so that a user can click on them and see posts in THAT category tagged with ...
1
vote
1answer
26 views

Inserting Category programmatically

I am wondering how should i insert the category programmatically and it should insert only 1 time after the theme is activated. I know up to here. function example_insert_category() { ...
0
votes
0answers
24 views

Assigning a post (custom post type) to parent term and children

I'm writing a script to import store listings into WordPress. The taxonomy structure consists of: State (Parent) > Region (Child) > Sub-Region (Child of region) > City (Child of ...
0
votes
1answer
532 views

How can I select a primary category?

I'm looking for a plugin or suggestion on how to select a primary/main (custom taxonomy) term in a custom post type. For example, I'm developing a Wordpress website for Musicians. I have a custom ...
0
votes
0answers
74 views

404 on term taxonomy archive pagination only with some terms

On my site I've created a CPT with a hierarchical custom taxonomy. Here the code: **CPT Args** $args = [ 'labels' => $labels, 'public' => true, ...
-1
votes
1answer
100 views

How to extract one field from wp_get_post_terms objects?

I know I can get an array of term objects with this line: $terms = wp_get_post_terms($post->ID, 'mytaxonomy', array('fields' => 'all')); Or, I can get a simple array of term names with this: ...
0
votes
0answers
145 views

How to get posts ORDERBY a custom taxonomy term's custom field?

I have a custom taxonomy program_taxonomy : /* register a common taxonomy for DRAMAS & reality_shows to get post by terms in PROGRAMS page */ register_taxonomy( 'program_taxonomy', array ...
0
votes
0answers
101 views

Best way to group posts based on custom post type terms

I have been trying to group custom posts based on the taxonomy terms as shown in this article. Here is another similar post: Display all posts in a custom post type, grouped by a custom taxonomy ...
0
votes
2answers
70 views

How to force acceptance of site terms on first login?

I want to force users to accept the terms and conditions of the site when they log in for the first time. I found a couple plugins that would show the terms, but they don't prevent you from ignoring ...
0
votes
1answer
108 views

Looping Through Custom Tax Terms and Displaying All Posts For Each

I'm using the following code to attempt to loop through each of the terms within my custom taxonomy category-film and then output the term name as a heading together with displaying all the custom ...
0
votes
1answer
54 views

Echo taxonomy name - second level

I have the following taxonomy: Location: Province --City ----Suburb Province --City ----Suburb How can I echo the names of "Suburb" (second level) on an archive page? So, for example: Location: ...
0
votes
0answers
36 views

How to display custom taxonomy grandest children in three columns, with first child as column heading?

I have a taxonomy structure thats 4 levels deep, with the name 'services_tax': Parent - Child - - Grandchild - - Grandchild - - - GrandGrandchild I am trying to get the terms selected on a custom ...
1
vote
1answer
369 views

How to get posts from multiple custom post types according to it's custom taxonomy terms?

I have two custom post types and separate taxonomies for each. post type - dramas --------- taxonomy - drama_taxonomy post type - reality_shows -- taxonomy - reality_shows_taxonomy For now I am ...
1
vote
1answer
54 views

Get posts by querying taxonomy and certain terms of the taxonomy?

I have a taxonomy called schedule_day_taxonomy add_action( 'init', 'schedule_day_tax_func' ); function schedule_day_tax_func() { register_taxonomy( 'schedule_day_taxonomy', ...
0
votes
1answer
63 views

Weekdays as terms - How to order taxonomy terms by ID in admin panel?

I created a custom taxonomy using following code. add_action( 'init', 'schedule_day_tax_func' ); function schedule_day_tax_func() { register_taxonomy( 'schedule_day_taxonomy', ...
1
vote
1answer
30 views

How to restrict users and admin from creating new taxonomy terms?

I've created taxonomy (schedule_day_taxonomy) for a specific custom post type (schedule). add_action( 'init', 'schedule_day_tax_func' ); function schedule_day_tax_func() { register_taxonomy( ...
0
votes
0answers
12 views

What is the earliest hook you can piggyback on to check terms/taxonomy for a collection view?

I am attempting to set up some conditional logic based on whether or not get_the_terms( $post->ID, 'product_cat' ) has the term 'Photographs' in it. Currently I'm using the wp hook, but that ...
0
votes
0answers
28 views

Can I use a second taxonomy when creating a post?

I have created second taxonomy, and can use it when creating a new post. However, on the front-end of my theme, using the wp_terms_checklist function, how do I create a post using 2 taxonomies? My ...
0
votes
1answer
232 views

Get array of current post term ID's

I'm creating a little "Related posts" section on a site and I'm doing it based on terms in a custom taxonomy called "director". How can I get an array of term ID's for the current post so that I can ...
1
vote
1answer
214 views

Updating / Saving items generated by wp_terms_checklist on frontend

I'm displaying a list of custom taxonomies from a custom post type on a frontend page which shows any items that the user has previously selected as checked. I have got it displaying correctly, but I ...
0
votes
1answer
68 views

How to filter a taxonomy meta field to the 'single_term_title' filter hook

To show terms in Bengali I enabled term meta fields, saving data into options table. I made a custom function (get_term_meta()) similar to post_meta to fetch my taxonomy meta data, that takes term_id ...
0
votes
1answer
103 views

Getting term description in single post template

I have custom posts called 'esitykset' and it has custom taxonomy 'tapahtumat'. Now I have been trying to get the description on one of the term in 'tapahtumat' taxonomy and i have no idea why it is ...
0
votes
1answer
44 views

Returning One custom taxonomy term name

I have a custom taxonomy called cities and right now the only city is las vegas. I am trying to use the code in question to echo "Las Vegas" - for the posts that are associated - on the search results ...
0
votes
0answers
15 views

Get name of child custom taxonomy

I had a list of custom taxonomy: Products > Spanish products > single hair > the product A How can I get the name of Spanish products custom taxonomy?
0
votes
1answer
332 views

How to get only child terms from a custom taxonomy of current post type?

Having a custom post type 'pubs' with custom taxonomy 'types' in which admin enter parent terms and their child terms. Using this code to get all the terms of current post type: $object_terms = ...
0
votes
1answer
329 views

how to display child terms with parent terms in custom taxonomy?

working on a journal website, having custom post type "publications" with custom taxonomy "issue". In the custom taxonomy admin enter first the volume number as parent and then the issue numbers as ...