Questions tagged [terms]

In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Can't display multiple terms with get_the_terms

I am trying to display the terms (from a custom taxonomy) of a single post, but I can't display more than one term. When I try to display all the terms using a foreach loop, it doesn't display ...
0
votes
0answers
15 views

get_terms based on post meta value

I'm listing events using the following arguments for my query, these load in via ajax and have a filter: $date_args = array( 'post_type' => 'events', 'meta_key' => 'event_start_date', ...
0
votes
1answer
20 views

Add Taxonomy Description with wp_set_post_terms

I am adding tags during wp_insert_post using wp_set_post_terms. But I have no clue how to add a tag description with my code. I have not found anything out there.
1
vote
1answer
10 views

Clone Terms of one taxonomy to another

I have list of products and associated product categories. I like to clone same terms and their hierarchy along with product association to a newly created custom taxonomy.
0
votes
2answers
14 views

How to Link to Most Recent Custom Post of Same Term

Title says it all. I'm trying to link to the most recent post of a custom post type, but only within the same term. Currently my code successfully echos the correct term ID but doesn't show a link ...
0
votes
0answers
9 views

Get The Most Recent Post of a Specific Term From Current Post

I'm developing a website for a webcomic and I'm having problems getting the page system to work. I have a custom post type set up for comic pages, and the pages are organized into volumes (with ...
0
votes
1answer
18 views

Setting posts_per_page for taxonomy term template

I have a custom taxonomy term page set up to display posts associated with that term (taxonomy-insight_type-academia.php). I figured I could use the following to limit the posts on that page based on ...
0
votes
2answers
55 views

How to get posts that contain multiple terms from multiple taxonomies?

If I have a list of term ids, like 1,2,3,4,5 that correspond to tags, categories and custom taxonomies, how can I get all the posts that contain all these terms? Let's say from that list of term ids, ...
1
vote
1answer
32 views

How to get the top level parent term Advanced Custom Field values in the child terms

I am using Advanced custom fields in my product_cat taxonomy to display fields on my product category pages. I would like to be able to edit the top parent product category and have those changes ...
0
votes
0answers
17 views

Get custom taxonomy terms that contain posts that have another taxonomy term

I have two taxonomies for my property post type: property-style which has terms for different home styles like "Country" and "Modern", and property-tag which has terms for ...
0
votes
1answer
10 views

How to list posts by terms

I have a custom post type with custom taxonomy and 3 differents terms. I'm trying to build a page with this structure : Term 1 Post tagged with term 1 Post tagged with term 1 Term 2 Post tagged ...
0
votes
1answer
13 views

Split taxonomies on different pages

I'm working on a Woocommerce website and created a new taxonomy activity. I've added that taxonomy to the post type Product. So a Product can have one of the following activity: Museum Food & ...
0
votes
1answer
34 views

Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?

I have created a custom taxonomy with the basic code below. I created a term called 'video' some time ago to test it. I created a few other terms today then noticed that I cannot delete or edit that ...
0
votes
1answer
37 views

Clear Terms from Taxonomy for Specific Post IDs?

Trying figure out how I can use some SQL/$wpdb->query to delete all the terms from a taxonomy that are related to specific post IDs. The following works beautifully to delete all the terms from a ...
0
votes
0answers
22 views

Taxonomy.php inheriting first post

I created a generic taxonomy.php file to list posts with certain terms. <?php get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <a href=...
0
votes
0answers
7 views

Updating YOAST metatitle + metadescription within a custom taxonomy?

I was just wondering if there was a way to update the yoast metadescription/title for a custom taxonomy? I know that posts have: update_post_meta($post_id, '_yoast_wpseo_metadesc'); Which is nice ...
0
votes
0answers
9 views

Show content/template for the /tag/ or /taxonomy/ part of the URL in Wordpress

Heu, I've been trying to figure this problem out but can't quite find an answer. On my WordPress site, the URL for tags is mysite.com/tag/tag-term. This displays fine using the tag.php template. ...
0
votes
0answers
18 views

How to hide terms in edit.php

I would like to know the hook to overwrite the display of terms list for taxonomy in post edition page. My goal is to hide some terms for a specific taxonomy that I cannot remove (generated by theme ...
0
votes
0answers
9 views

Add 3rd level to Categories lists

I have a 2 level list of categories displaying checkboxes for a filter. <?php $terms = get_categories( array( 'orderby' => 'meta_value', 'meta_key' => 'orden', 'parent' => 0, ...
0
votes
1answer
28 views

get taxonomies from terms

I have two post types Documents News Items with categories for each post type, Documents -- PDF, Word, Excel News Items -- Articles, Releases BUT they share the same tags. Documents -- BOSS, EFF, ...
0
votes
1answer
33 views

Excluded Custom Taxonomy Term Posts Displaying in loop

I created a custom post type called "careers" with a custom post type taxonomy called "careers_categories". Within this taxonomy I have a term called "featured". My intent is to exclude all post ...
0
votes
1answer
49 views

Replace deprecated get_category_children code with get_terms

I've been using this piece of code for years on one of my websites: <?php if (is_category()) { $this_category = get_category($cat); if (...
0
votes
0answers
9 views

order terms by count

Is there a way to order my term list by the terms that got more posts related? Im trying this, but without success: <?php $terms = get_terms( 'jobinformationcat', array( 'orderby' => 'count'...
0
votes
1answer
20 views

The Difference Between Categories and Tags and Taxonomies and Terms

I've got a custom post type 'articles' and I've added a custom taxonomy 'articles_categories' which has its own terms. I was under the impression you can't have categories and tags on custom post ...
0
votes
1answer
13 views

How to group all terms children's in custom taxonomy?

I have a loop term of my custom taxonomy here: <?php $terms = get_terms( array( 'taxonomy' => 'customtax', 'hide_empty' => false ) ); $i = 0; ...
0
votes
0answers
17 views

Display Custom Post Type Based on Taxonomy With WP_Query()

I would like to pull in 3 posts from a custom post type called 'articles' that have a 'Featured' custom taxonomy term. I'm using the code below, but it isn't pulling in just the posts with the '...
0
votes
2answers
53 views

Hierarchical taxonomy list with modificated term links

I have two functions displaying a term list of the selected taxonomy: First function: $terms = get_the_terms(get_the_ID(), 'MY_TAXONOMY'); if (!is_wp_error($terms) && !empty($terms)) { ...
0
votes
0answers
18 views

Get taxonomy terms used in posts that have second taxonomy with specific term

I'm not sure I know how to phrase this question best, so please bear with me. I have a custom post type (artworks) which has two custom taxonomies attached (artist eg. name, and media eg. painting ...
1
vote
1answer
53 views

get_the_terms - only top level

This code works good: $terms = get_the_terms(get_the_ID(), 'my_taxonomy'); if (!is_wp_error($terms) && !empty($terms)) { foreach ($terms as $term) { $name = $term->name; ...
0
votes
1answer
10 views

Order get_terms by count using a custom taxonomy hierarchy

When I test get_terms with normal Wordpress posts it seems to be working. Maybe because I don't have hierarchy yet for these categories. But it doesn't work with WooCommerces custom taxonomy "...
0
votes
1answer
13 views

Relate term to term?

How can I set a relationship between two taxonomy terms (each of a different taxonomy)? So, relate a "person" term "John Doe" with a "company" term "Acme Inc"?
0
votes
0answers
19 views

Advantage of saving term translations with polylang?

Ok, so I'm trying to automate the generation of posts and custom taxonomies in different languages, and it's all working. What I did (summary): create posts with wp_insert_post() set language of ...
0
votes
1answer
21 views

WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)

This is really confusing me. I've tried numerous things but cannot get appropriate results. Here's what I currently have for my query: $args = array( 'post_type' => 'product', 'tax_query'...
0
votes
0answers
19 views

How can I get individual information for a taxonomy child term?

The post page created by wordpress custom post is displayed on the taxonomy archive page. At that time, how can I retrieve the name of each taxonomy child term linked to each post? For example, ...
0
votes
1answer
26 views

How to order taxonomy terms by most recent post?

I have a list of terms showing in slug order but I need to order them by most recent posts, so it will be changing depending on what term has the most recent entries... Is there a way to do so? I ...
0
votes
1answer
100 views

Can't display posts by filtering categories using isotope.js

I am currently building a wordpress theme using the isotope.js script which allows you to display articles on the same step by filtering their categories, I struggled a lot and I still can't get the ...
0
votes
1answer
42 views

Set post categories to include parents when setting child category

I have a WooCommerce setup and when I create a new product, I assign the product a category as normal. Clothing - Womens -- Accessories - Mens -- Accessories <-- assigned to this term What I am ...
0
votes
0answers
10 views

How to enable linked user groups and “on behalf of” posting?

I’m looking at creating a site with the following concept: At PR agencies, reps are responsible for creating and mailing out to journalists comments made by their client’s executives in response to ...
1
vote
1answer
24 views

How do I display the taxonomy term alongside the post type post title?

I would like to display the taxonomy term of the post type post besides the post type post title, separated by the “in” or "Posted in" text string. What i tried so far: $output .= '<div>' . ...
1
vote
1answer
52 views

How to use get_the_terms() to display multiple terms?

I'm using the following code to display a custom taxonomy in the metadata for a single post, but now I need to display multiple terms separated by commas instead of just a single term. Just not sure ...
1
vote
2answers
18 views

Display the description of taxonomy terms

I have a taxonomy called ORGANIZER. All the terms of this taxonomy have a name and a description. I tried to get the description of each term but i don't know how to loop on them. I suppose i mus ...
0
votes
1answer
20 views

List taxonomy terms plus their latest post ordered by post date

I have the following code: $custom_terms = get_terms('columna'); foreach($custom_terms as $custom_term) { wp_reset_query(); $args = array('post_type' => 'post', 'posts_per_page'=&...
0
votes
0answers
47 views

Best practice: Many hierarchical vs. few non-hierarchical taxonomies

I'm building a site that will eventually host thousands of posts, all from the same custom post type "Artwork". Each blog post has multiple custom taxonomy terms assigned, e.g. "Artist", "Project", "...
2
votes
1answer
127 views

how to create a proper query for getting a list of users with taxonomy related meta key

I want to list user based on the sub category (which is a taxonmy). It displays users from all the sub category rather than the one I select the sub category from the back end. The code is below, ...
0
votes
0answers
18 views

Display posts by taxonomy and taxonomy child

I am trying to show my CPT posts grouped by child taxonomies (in archive-CPT.php) in something that looks like this... Parent taxonomy 1 Child Taxonomy 1 * Post 1 * Post 2 Child Taxonomy 2 ...
0
votes
0answers
8 views

Detect Terms of Current Post on Save

I’m attempting to automatically assign terms from a parent post to automatically generated child pages. I am able to detect all children for the given post and can set a term however when attempting ...
1
vote
1answer
19 views

Custom Template for one Taxonomy Term

'''' Hallo , I have a custom post type called Grants , Taxonomy Called scholarship_degree and a Term Called all-degrees-scholarships. I have made a single-grants but I need now to make a Single ...
0
votes
1answer
106 views

WP Job Manager plugin - Listing only the twelve job categories on frontpage order by jobs they have

i am using wp job manager plugin and i am trying to list on the frontpage only the twelve job categories according to the jobs they having. The job categories having more jobs go first. I managed to ...
1
vote
1answer
245 views

Notice: Trying to get property 'term_id' of non-object

I receive the error on taxonomy page in wp-admin.Before this error, I had problem that couldnt add the taxonomy to menu because of my taxonomy code.I fixed the code then the current error became.So, ...
1
vote
1answer
56 views

Custom post taxonomies as tax_query terms?

I have these two custom post types called “product” and “reference”. On “references” I have attached a custom taxonomy called “product_reference” which I use to specify which products the references ...

1
2 3 4 5
27