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
2answers
296 views

Ordering Posts with Custom Taxonomy Terms Array

I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added ...
0
votes
0answers
27 views

How can filter terms by custom meta data

I have terms and i get data like :- $cat = get_terms( "progamdvideo_c", $args ) ; foreach ($cat as $term) { echo $term->slug; } Now i have metadata for this term ...
0
votes
0answers
12 views

Custom terms in custom category taxonomy

I have a Custom Post Type called 'directory'. I have a custom category taxonomy assigned to the post type called 'directories'. This custom taxonomy has several custom terms (e.g. one is 'art ...
0
votes
0answers
14 views

Display authors Whos write in category

i have block that display all category in custom post type of my site like this:- $cat = get_terms( "progamdvideo_c", $args ) ; now in post type i add article, each article have authors, how can ...
0
votes
0answers
54 views

How to include specific post terms in Facebook share?

So I already added the necessary scripts to add a Facebook share button in my posts <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = ...
0
votes
0answers
78 views

How to use if statements to check and echo terms by hierarchy in a post?

I'm seeing a lot of posts on here with helpful snippets to resolve my problem, but nothing has been specific enough to help me - or I just don't understand how to make those solutions work for my ...
0
votes
0answers
16 views

How to make taxonomy both hierarchical and not

I need my taxonomy to be a checklist, so I set hierarchical => false. However, I also need a search functionality similar to when hierarchical is set to true. Is there a way to "combine" both? Or ...
0
votes
1answer
31 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
0answers
24 views

Custom search function not finding posts with tax terms even thought the association exists

I have a custom hierarchical taxonomy called "destination_category" with terms like so: Cultural Museum Historic I have a custom post type with posts associated with all three "Cultural" ...
0
votes
0answers
43 views

Get current terms info when querying by multiple taxonomy terms

I'm currently using the following in my archive template to create a menu of taxonomy terms and add a 'live' class to the term that's currently being queried. $termsA = get_terms('MYTaxA', array( ...
0
votes
1answer
171 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
228 views

list taxonomy terms in current post / current category

i need to display taxonomy terms in a custom post and also in archive / category page of that post type. terms must be from current post or current category ...
0
votes
1answer
153 views

Loop through posts by each term and exclude duplicate posts assigned to several terms

Okay, i'll try to go a bit more into detail. What i did with this code is getting a list of artists ordered by alphabet. In this list i'm showing all corresponding news posts to this artists term. ...
0
votes
1answer
3k 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
62 views

Set terms in a custom post

I have a custom post "artist" and a taxonomy/category "artist category", and i want to create (by development) a new post and set the category of the artist but it doesn't work. I have tested it with ...
1
vote
1answer
190 views

Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms

I am using Isotope to filter posts on the fly from my archive pages. I have a Custom Post Type called "art". On the sidebar, I've created links to yearly archives on my sidebar, i.e. 2014, 2013, ...
1
vote
1answer
134 views

tax_query: What to pass when I want to have all terms?

… $args = array( 'post_type' => 'wr_event', 'posts_per_page' => -1, 'meta_key' => 'event_date', 'orderby' => 'meta_value_num', 'order' => $order, 'meta_value' ...
5
votes
1answer
309 views

Slow wp_term_relationships query

I'm running a large WP instance (currently has 28,000+ posts in custom types) and have been experiencing some odd slowdowns. Upon analyzing the MySQL slow query log, one of the problem queries is: ...
0
votes
1answer
354 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
83 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
0answers
152 views

Get term_taxonomy_id from return of wp_insert_post

I am trying to get the term_taxonomy_id from the returned array of wp_insert_term. Below is my code. The term is correctly added to the db, but it fails when i try to get the id and save it to a ...
0
votes
0answers
27 views

Make taxonomy terms appear in the order they were made

IS it possible to make taxonomy terms appear in the order they were made, in the backend? They keep appearing in alphabetical order. I tried using sort but it doesn't seem to be working. This is my ...
0
votes
1answer
53 views

get_terms returns array starting at 4

I am using get terms to return a list of terms within a custom taxonomy. It's returning an array but it starts at index 4. How do I get it to start at 0 like normal?
0
votes
0answers
96 views

Custom post type URL returns 404 error page

I have a post_type called "products" and inside it have two taxonomies "destinations" and "types". Inside destinations i have a list of countries as terms and inside types i have (hotels, cruises). ...
0
votes
2answers
240 views

Want wp_get_post_terms return in arbitrarily order, how to do?

Function below returns in alphabetical order and not, as wished, in arbitrarily order. Is it possible to -not- return in alphabetical but in exact order as given in the array? ...
0
votes
1answer
61 views

Multiple taxonomies & terms (no hyperlinking) in 1 function [duplicate]

I am trying to make a function but (because the lack of my knowledge) can't figur out how to do. The codex shows an example for using 1 taxonomy and 1 term and as output nice showing 1 Taxonomy / 1 ...
0
votes
0answers
44 views

Sideways8 Taxonomy Images add term issue

I'm using the Sideways8 Taxonomy Images plugin (latest version), with WP 3.7.1. I also use the woocommerce plugin (latest version). It all worked well till some point, where I really don't know why, ...
0
votes
0answers
74 views

Combining / Merging two queries?

So I am working on an isotope filtered portfolio page that pulls any attachment tagged with the term "digital-interactive". Each attachment is also linked to a custom post_type called "work". On one ...
0
votes
2answers
198 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
0answers
31 views

What is the relation between taxonomy table and database in WordPress

I am new in WordPress. Somebody says that taxonomy table is useful in WordPress database. I don't know what is it. Please give the real idea about taxonomy table in WordPress.
0
votes
1answer
510 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" , ...
0
votes
1answer
526 views

Using in 'category_name' in '$query->set();'?

Here's the function I have in my theme's functions.php: function better_editions( $query ) { // Categories act as 'Editions' on my site $get_edition = get_query_var( 'category_name' ); ...
1
vote
1answer
190 views

Determine Term depth

I'm looking to be able to find the depth of a term within it's hierarchical tree. Produce -- Vegetables ---- Carrot ---- Onion ---- Celery -- Fruit ---- Apple ------ HoneyCrisp ----Orange Produce ...
0
votes
2answers
466 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
1answer
201 views

Query set using tax_query with relation 'OR' modifies category object?

(Update: Please see the edits far below.) The code: function itsme_better_editions( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( ...
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 ...
2
votes
1answer
165 views

When to use 'get_category_by_path' vs. 'get_term_by' to get category object from `get_query_var( 'category_name' )`?

I'd like to retrieve the category object from the category name, using the public query variable category_name, via get_query_var( 'category_name' ): $cat = get_query_var( 'category_name' ); There ...
0
votes
1answer
88 views

Non-Recursive get_term_children()

I have a custom taxonomy called product_category. There are child terms 3 levels down. They look like this: Term1 Term2 Term3 When I am on the taxonomy page for Term1, I wish to use ...
0
votes
1answer
60 views

Custom Taxonomy List with Children

I am trying to display a list of terms for a custom taxonomy and am having a bit of trouble. The custom tax is for a Custom Post Type called project. What I want to do is list a Parent term and it's ...
0
votes
1answer
115 views

Can't pull metadata for a term in my theme's function.php

I have a strange issue where I've attached custom metadata to a Woocommerce product category using the KC Settings plugin and for some reason, I can access the data just fine in a separate plugin that ...
0
votes
1answer
189 views

Getting taxonomy images to display on single-post with their terms

Having some trouble with taxonomy images plugin. I am on single-post.php and I want to display my post's taxonomy terms & the term's associated images. Ideally, I'd like the taxonomy description ...
0
votes
1answer
150 views

List post from current taxonomy children

I have a custom post type and a taxonomy with children, with a template file named taxonomy-productcategories.php. On this i want to list all children with their posts. Child taxonomy 1 Child ...
0
votes
1answer
77 views

Where to populate custom terms in custom taxonomy in plugin?

I have a plugin that successfully creates a custom taxonomy for a custom post type. What I'd like to do, is on activation (or wherever works), create a default set of terms for the custom taxonomy. ...
0
votes
0answers
26 views

How to choose the parent category that shows when using multiple custom categories [duplicate]

When a post is in two or most custom categories, how can I specify the parent category name that I want to show up? An example is the custom post type "tour". It is in the following categories: ...
0
votes
0answers
33 views

Get posts, terms and custom fields in array

I have a multisite and want all posts from post type products I want to query through the database to get all posts belonging to post type "products" i have accomplished this with the following code ...
0
votes
1answer
488 views

Custom Post Type Taxonomy Term Order by Title

I have a custom post type of Clients. The "Client Categories (taxonomy terms)" are called via taxonomy-client.php. I'm able to get the results to output as expected but I can't figure out how to get ...
1
vote
0answers
134 views

Add term to custom post type on draft

I'm trying to automatically add a custom taxonomy term to custom post type when the custom post type of property is created. The action is firing but it is not adding the term. I know it is firing ...
0
votes
0answers
15 views

Showing parents of taxonomy terms associated with a post OR showing only bottom-level terms associated with a post

I have a custom taxonomy structure associated with a custom post type on my Wordpress site (selling sheet music): It's something like this, to give some context: Flute ensemble 3-part flute ...
1
vote
1answer
122 views

PHP Code to Display Term URL & Name of a Post Under a Custom Post Type

I am featuring a post in my footer(outside the loop) from a custom post type and am using Advanced Custom Fields plugin to do so. This is the code I am using: <h5>Featured Movie</h5> ...
0
votes
1answer
93 views

List terms of custom taxonomy if matches other taxonomy

So the title is confusing but I can't think of a better way to word it. Basically, I have two taxonomies of "state" and "city" (that have to stay separate for other reasons). Lets say for instance, a ...