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
1k views

Update term count using a callback function

With the wp_update_term_count_now, how can I use the update_count_callback to specify my own count. I need to include counts from another database that the current database category is able to ...
0
votes
2answers
93 views

Leveled - Terms foreach

I need to build a php foreach that goes through all my terms in my custom taxonomy 'Section'. I know how to get a foreach of all the terms in 'Section', but what i cant do is build it with levels. I ...
0
votes
3answers
4k views

Retrieve single term slug

I'm creating common "Single Tag Page" for different Post Types. I'm using next code: $loop = new WP_Query( array( 'post_type' => 'any', 'tag' => single_term_title( '', false ), 'posts_per_page' ...
0
votes
1answer
25 views

Retrieve posts by term id custom query

i want to retrieve custom posts using using custom query . my taxonomy is recipe_tx and terms (Beef) , (Chicken) etc in it . i have tried using SELECT p.* FROM wp_posts p, wp_term_taxonomy tt, ...
0
votes
2answers
8 views

How do I prevent term from being created on create_term hook?

I have a function working on 'create_term' hook, I'm trying to prevent the term from being created on certain situations, I've tried return false; But that didn't do much, how do I prevent the ...
0
votes
1answer
46 views

How to add terms (without deleting others)

I have a form on my site that allows signed in users tag products from the front-end of the site in a basic form. I am using Woocommerce as the commerce platform. Woocommerce uses Custom Post Types ...
0
votes
3answers
97 views

Get a count of how many times a term or a category is used in posts

I need to find out the number of times a term/tag or category is used in a post in WordPress. I wrote the below SQL query. SELECT t.name , count(*)FROM wp_terms t JOIN wp_term_taxonomy tt ON ...
0
votes
2answers
182 views

Display all posts that use a custom taxonomy

I'm trying to display all the posts that use a custom taxonomy. I believe the issue is that it is my code is not generating an array of terms. $clients_terms = get_terms('clients'); ...
0
votes
1answer
95 views

Is altering a default WordPress database table update safe?

I want to add some table columns to the wp_terms table. Is it safe to use the dbDelta function with a modified CREATE-MySQL query for this? Or will I run into problems in the long turn? Is it update ...
0
votes
2answers
122 views

Get terms within a custom taxonomy

I need to get an array of all terms within a custom taxonomy where they have a parent term from another custom taxonomy. The example would be I have a custom taxonomy "School" where each term (in this ...
0
votes
2answers
38 views

WordPress Term for Custom List

Would you mind helping me out. I am experienced in programming yet really new to wordpress. I was task to handle this. I just need to know what are these called (The ones with the pin icon): Image is ...
0
votes
1answer
127 views

Get terms that don't belong to current post with a shortcode

Is it possible to retrieve all the terms of a custom hierarchical taxonomy that do not belong to the current post? Perhaps by using wp_get_post_terms()? I recently stumbled upon this unusual need. ...
0
votes
2answers
125 views

Get used terms by an author as array of strings

I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya'). function ...
0
votes
2answers
685 views

why the archive of custom taxonomy term shows nothing?

I have a custom post type for which I have created a custom taxonomy called 'tag'. taxonomy-tag.php file looks like this: <?php get_header(); ?> <?php $term = get_term_by( 'slug', ...
0
votes
1answer
21 views

Admin (All posts) stop responding problem

I have situation like this: I have site with 500+ posts, 10+ custom taxonomies, one of taxonomy have 20000+ terms. When in admin panel I go to Posts-> All posts wordpress opens the page but stops ...
0
votes
1answer
316 views

input radio 'checked' saves, but select option 'selected' doesn't

So I followed a tutorial on how to create a meta box w/ the taxonomy terms shown in radio buttons. (Tutorial here for others if interested: ...
0
votes
1answer
774 views

get_term_link not working

I am trying to use the below code snippet to display an image and then wrap it in a link to a specific term archive page. In this case, I have a custom taxonomy (Series) with a few different terms. ...
0
votes
2answers
238 views

Add text to the end of each list item in wp_list_categories

I haven't been able to find what I'm looking for and not sure how to approach it. I'm using wp_list_categories to obviously list terms of a taxonomy. I'd like to add some text to the end of each ...
0
votes
1answer
295 views

Custom Post Types Archives and Single Pages not showing custom taxonomy data

I have a custom post type called "Newsitems" that I have registered two custom taxonomies for: "newsitem types" and "news item tags" I want these two taxonomies' terms to appear almost like the ...
0
votes
1answer
64 views

array_replace throwing php_warning but working anyway

Hello I have a question which is maybe more PHP question than WordPress, but could be interesting in a WordPress context in case someone wants to add properties to an WP object. I have created a ...
0
votes
1answer
163 views

Return Taxonomy Name for Each Term

I am returning a list of the terms from three different taxonomies. $terms = get_terms(array("air-categories","web-categories","ink-categories")); I get the list and I need each to link to a ...
0
votes
1answer
378 views

Querying posts by latitude and longitude to build a Google Maps with several markers

I have 4 different post types and 4 differey taxonomies Each term for each taxonomy stores a marker (url to a png icon). Each post has coordinates attached with Advanced Custom Fields and I'll ...
0
votes
1answer
887 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
2answers
440 views

How can I get category ID by category name?

I have a few categories with the same name [some of them are sub-categories]. And I want to get an array of ID's for certain cattegory name. I tried this: $term = get_term_by('name', $cat_name, ...
0
votes
1answer
190 views

Get Categories Where Taxonomy Equals 'n'

I have a custom taxonomy(the taxonomy is types) that is basically a selector that tells WordPress which section of the site to place the new post. So for example I create a new post and select ...
0
votes
1answer
272 views

echo term name outside the loop, using term slug

I have a strange question... I have my term as a variable... $mailer = 'may-2012-newsletter'; And I'm trying to echo on my page the Name of my term, using the variable above. But this is not in a ...
0
votes
2answers
2k views

Query posts using custom taxonomy and selected terms

I'm not able to use array for the terms in the following query, only a single term: $args=array( 'facts' => 'information', //taxonomy:facts and term:information 'post_type' => ...
0
votes
2answers
81 views

How do I print a term list but alter the link text?

I have a long list of taxonomy terms that all look like City-ST-Zip, ie: Phoenix-AZ-85043 or San-Diego-CA-92037 How do I print the list of terms so that the link URL remains intact but the link text ...
0
votes
1answer
316 views

Shared terms between taxonomies

Need some help from you. It's a matter of classification. Here is the deal: I've got a custom post type about movies and I set up some custom taxonomies (non hierarchical, so acting like tags) for ...
0
votes
1answer
304 views

Unsetting post_tag taxonomy breaks term description for other taxonomies

Here's something I can't figure out. I don't need the default post_tag taxonomy, so I'm removing it with this piece of code : function mwm_unregister_taxonomy(){ global $wp_taxonomies; ...
0
votes
1answer
541 views

How to display terms and conditions in post area?

I'm running a multisite. I would like to display "Terms and conditions" when user trying to create a new post. Users should Click "I agree" link and then proceed to create a new ...
0
votes
1answer
1k views

Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term

Say, for example, I have the following custom taxonomy: Term 1 Term 1.1 Term 1.2 Term 1.2.1 Term 1.2.2 Term 1.3 Term 2 Term 2.1 How can I get the children terms of Term 1, ...
0
votes
1answer
234 views

Remove a href from this code

I am using a short piece of code(which is modified, originally it was a plugin-Taxonomy Terms List) to display custom taxonomies after the post, When the terms are displayed, it is displayed with a ...
0
votes
1answer
1k views

Get_the_terms restrict output

I have a custom post type Holiday associated with a taxonomy Country. On my single-holiday.php, I use the taxonomy to display in the title. For example Holiday in Spain (Spain being the tax) Rarely, ...
0
votes
1answer
12 views

Can I generate then display a mixed list of linked and unlinked terms

Does anyone know a straightforward way to display a mixed list of linked and unlinked (custom) terms, dependent on whether there is more than one instance of a term being used? i.e. I have an item ...
0
votes
1answer
41 views

Limit Words in Category / Term Description - Admin Panel

I'm working with a Taxonomy where the Terms have lengthy descriptions. It makes the Admin Panel look really ugly when WordPress tries to display these descriptions for 10 categories. I'm trying to ...
0
votes
2answers
32 views

Wp_query…a type of term a different div

I need to create a table like this image and I want a specific term in particular DIV but with my code appear all together. Example: One div brown with the 5 products. The effect I want is like an ...
0
votes
1answer
21 views

Are term IDs unique even between multiple custom taxonomies

I can't find the answer for this question on either Wordpress or here, nor via Google searches, so I'm throwing this out to the community. If you have two taxonomies, and you add 1 term to each ...
0
votes
1answer
69 views

get_the_terms return only last term

In my custom post type (portfolio_pt) I have some hierarchical category structure something like that: ParentCat |-child |-someItem ParentCat2 |-cild ... When I try to get list of all terms by ...
0
votes
1answer
25 views

How to get this value inside RETURN

I'm doing something new & unexpected tonight with a lot of errors, and I have asked a lot of stupid questions tonight, so I promise this is the last one :) In last post, I received an answer that ...
0
votes
1answer
33 views

How to list Custom Taxonomy

I have a WordPress taxonomy, and I was wondering if there's anyway to list the taxonomy like: <ul id="portfolioFilter"> <li class="filter" ...
0
votes
1answer
52 views

Exclude categories by ID

I've searched this site and tried all kinds of ways to exclude categories 1 and 7 from this list, but nothing is working. No errors but doesn't hide the cats either. Categories 1 and 7 are not empty, ...
0
votes
1answer
49 views

Set unique term_id from custom meta keys

I have a function to set a custom meta keys values to a taxanomy, term. $category20 = $fields['field_52dd3aa1d6bc0']; // gps wp_delete_object_term_relationships( $post_id, 'gps' ); ...
0
votes
1answer
96 views

How to add a date creation field when a custom taxonomy relationship is created?

I need to display a list of posts and order it by date. The date of when the taxonomy term relationship was created. Is this possible? If so, how can I approach it? Thank you. EDIT - SOLVED! ...
0
votes
1answer
28 views

Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?

I'm in the process of creating a leveled tutorial structure in WordPress and want to build it so that it sets up the front-end with no code needed from the user. So far, I have a custom post type ...
0
votes
1answer
98 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
1k views

Get term slug of current post

I am working on a single post type template where I show a navigation menu with links to all the posts from the same term. Now I want to use this template for all the different terms so $term_slug ...
0
votes
1answer
252 views

has_term() does not return when term is assigned post?

Ok, I have an archive loop. In this loop I have this... <?php if ( has_term('race') ) { ?> <strong class="archive-event"><?php the_title($event); ?></strong> <?php } ...
0
votes
1answer
79 views

If has_term, load other theme

This is what I want to accomplish. I've created a taxonomy called categorie with the terms app, web and branding. When a project has the term app, I want to load another theme / blog. When a project ...
0
votes
1answer
380 views

Get terms for a specfic post from multiple taxonomies in custom post type

I have created Custom post type 'references' and two taxonomies under this e.g "Custom Taxonomy A" have Categories "Cat-a1" , "Cat-a2".... "Custom Taxonomy B" have Categories "Cat-b1" , ...