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

1
vote
1answer
955 views

Query posts from a child taxonomy term id

this is my structure.... State1 CT1-1 - Car_Model Post-CT1-1 (the posts of child) - Car_Model Post-CT1-2 CT2-1 - Car_Model Post-CT2-2 CT3-1 - Car_Model Post-CT3-1 State2 CT1-2 ...
1
vote
0answers
282 views

Why is my 'list_terms_exclusions' filter function timing out? [closed]

Why is my function timing out? When the issue was first noticed I added wp_defer_term_counting('true') to delay that process but to no avail. /* Filter category from get_categories and ...
1
vote
1answer
167 views

Which post does a taxonomy term belongs to?

I’m having a page which displays all custom taxonomy terms for a particular type which I get from the URL. I use this code to retrieve all the terms: $args = array( 'post_type' => ...
1
vote
1answer
281 views

How to edit/remove a term that's in multiple taxonomies?

Some of the terms on my site appear with the same exact slug, in multiple taxonomies. For example: 'education' appears in both the 'department' taxonomy and the 'topic' taxonomy. Now, I can't seem ...
1
vote
0answers
509 views

Cleaning up a Gravity Forms 'Checkbox' field tied to large taxonomy [closed]

I'm using Gravity forms to allow my users to create posts from the front end, but I'm having an issue making a certain form-function I'd like to have work and display nicely. Essentially, I want my ...
0
votes
3answers
47 views

Targeting custom post type

I have the following loop working as I want it but I need the 'activists' list item to include <?php the_post_thumbnail(); ?>. What would be the best way to write this? <?php ...
0
votes
3answers
828 views

How to get WordPress term attached to the Post?

How to retrieve all WordPress terms attached to the Post and Other Post type? Assumed I don't know/don't care about the taxonomy, term name/term id etc, the only thing I know is post_id. Thank you.
0
votes
1answer
2k 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
3answers
7k views

Get current term's ID

Im using the following code to get an array of children taxonomies and write them out with links in an unordered list. <?php $termID = 10; $taxonomyName = "products"; $termchildren = ...
0
votes
2answers
504 views

Query posts with double taxonomy

So I have a custom type called "vendors" and two custom taxonomies for it. One is "state" and the other is "type". I am trying to list all the vendors from a certain state on one page. I'm using the ...
0
votes
2answers
469 views

When/why does '$query->get( 'tax_query' );' return empty?

First the code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( 'post_type', array( 'post' ) ); ...
0
votes
2answers
553 views

Automatically Assign Parent Terms When A Child Term is Selected

I have deep hierarchical taxonomy and I want to have all parent term assigned when I select a child term. I need it for category structure on a online listing/classified site. CPT name: product ...
0
votes
1answer
3k views

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( 'catalogs' ); $mycatalogs = array( -1 => 'Select a catalog' ); if ( $catalogs_terms ) { ...
0
votes
2answers
199 views

Checking if a woocommerce attribute is set

I'm trying to figure out how I can check if a custom attribute is set in woocommerce on a product. As It generates an error if that particular attribute isn't set. Here is my code that pulls in the ...
0
votes
4answers
279 views

100+ terms in any taxonomy slows down post updates?

I'm making a fairly large (for me) e-commerce shop with Woocommerce. The shop has ±1300 products and will be going to ±2000 products. There are also ±2500 Product Tags. I've had speed problems on a ...
0
votes
2answers
381 views

A mandatory agreement form to access another page?

I want to set up a page with a form the visitor needs to fill out and accept terms before going on to another page. Is there a plugin to do this? If no plug in, is there another way? Any help would ...
0
votes
1answer
238 views

Is it possible to get_terms by author?

I get terms from all my posts with get_terms, $tags = get_terms( 'mytags', '&number=5&orderby=date&order=desc&hide_empty=1' ); foreach ( $tags as $tag ) { echo '<a ...
0
votes
1answer
698 views

How to insert an array of terms using wp_insert_term?

WP provides a function to insert terms: <?php wp_insert_term( $term, $taxonomy, $args = array() ); ?> I have 60 $terms, each has its own $args, I want to prepare the 60 terms as an array, ...
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
2answers
68 views

Order get_terms using a Custom Field

I have a custom taxonomy of "crb_issues" that has a custom field associated with it that is "issue_date" which outputs a date value for each term to looks a lot like "20140601" yearmonthday. I am ...
0
votes
2answers
35 views

Get multiple term objects by ids

I have an array of ids that correspond to terms. How do I get the full term objects for each id? $ids = array(1,2,3); Ideally, I would love to be able to do something similar to the way taxonomy ...
0
votes
1answer
75 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
20 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
58 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
109 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
324 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
98 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
125 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
39 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
138 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
149 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
784 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
342 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
993 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
273 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
326 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
67 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
184 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
464 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
1k 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
585 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
208 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
285 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
329 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
332 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
584 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 ...