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
0answers
136 views

Get posts under a category with SQL

How can I retrieve posts under a category with plain SQL with out using WordPress native api's like get_pages? My Wordpress table wp_terms contains a term named Restaurants. I want to list the post ...
0
votes
3answers
667 views

Get post by term from custom taxonomy in another blog on the network?

I'm having trouble getting post by term in a custom taxonomy I have set up. The catch is this is multisite and I'm getting this data from another blog on the network where the taxonomy is registered. ...
0
votes
1answer
106 views

Author template - separate custom post type by custom taxonomy term for $curauth

Basically I have a post type called photograph, I then have a Taxonomy group called "Subject" and several tax terms i.e. Abstract, freeze frame etc (Approx 18 in total) under that Taxonomy group. I ...
1
vote
1answer
249 views

Changing taxonomy term by slug (wp_update_term)

What I am trying to accomplish is to update a taxonomy term name using its slug rather than the $term_id Wordpress does this by: <?php wp_update_term( $term_id, $taxonomy, $args ) ?> Is it ...
1
vote
1answer
214 views

How to display posts via custom taxonomy terms using checkboxes?

I would like to have a form with checkboxes. Each checkbox would be a term of my taxonomy "cities". The idea is that if a user select any of the checkboxes, it should show all posts that are NOT in ...
0
votes
1answer
57 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
130 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 ...
-1
votes
1answer
1k views

Woocommerce getting top level category parent and make all sub categories have the same template and menu

I want to get the top level category parent which is "wedgwood" so i give it a different menu and different template that what i wrote so far but it dont apply except on ‘wedgwood’ category wegdwood ...
0
votes
1answer
70 views

If post has ANY term attached to it, get the first one only

I am developing a theme that has several custom taxonomy that act as radio buttons. How do I write a conditional that does... if(post_has_any_terms($post->id, 'custom-taxonomy')) { echo $term; ...
1
vote
2answers
202 views

Have a Custom Post Type index page display taxonomy items instead of posts

I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. "online ...
1
vote
1answer
230 views

non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue

I registered a non-hierarchical custom taxonomy ('property_features'). There is a checkbox for every terms of this tax in a custom meta box on the edit-screen. All terms are displayed and all terms ...
0
votes
1answer
96 views

Show all terms in a custom taxonomy with all child terms wrapped in a ul

Is there a way that I can list all the terms within a custom taxonomy in an unordered list and wrap all child terms in another unordered list? For example; <ul class="menu"> ...
1
vote
2answers
130 views

How to List Parent Term Links for Custom Taxonomy With & Without Children?

I have a Custom Post Type of "projects", that is categorized by a Custom Taxonomy of "industry", which is heirarchical. Projects & sub-projects are assigned to the industries. For Example, the ...
1
vote
0answers
33 views

Ordering taxonomies by rank

I'm using a function (copied and modified a bit from this question ) which displays taxonomies in order by rank with » between parent and child and | between terms, but I get a mistake in the html ...
0
votes
1answer
133 views

How to list posts by term (custom taxonomy)

I created a custom post type (portfolio), with custom taxonomy (portfolio-category). I created a template, this template lists all "portfolio" posts. <?php while ( have_posts() ) : ...
2
votes
1answer
134 views

Category page only displaying the posts from a custom type

Situation I have two cpt: Projects Works In these two CPT I share the same taxonomy 'Category', and the same terms: Architecture Landscape Interior Design I have URLs like ...
0
votes
1answer
236 views

stdClass::$labels /wp-includes/general-template.php undefined

In my <title> tags I am getting undefined on a custom taxonomy in a custom post type and im struggling to find a way to set it. <title><br /> <b>Notice</b>: Undefined ...
0
votes
1answer
292 views

Order taxonomy terms wordpress

It seems like something really simple, however I can't find a good solution to what I am looking for. I created a page template that shows all my taxonomy term of a taxonomy called "news" eg: paper1, ...
1
vote
0answers
130 views

get_terms not returning any custom taxonomies

I have a custom post type called project with custom taxonomy called tagportfolio I use this code to generate both: add_action('init', 'project_custom_init'); /*-- Custom Post Init Begin --*/ ...
0
votes
4answers
235 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 ...
1
vote
1answer
177 views

Show posts from two or more custom taxonomy terms

I want to show posts which are filed 2 or more custom taxonomy terms. For example, I want to show the posts from custom post type "Classified" and filed under Books and House terms. The code below ...
2
votes
2answers
5k views

Display current taxonomy term when inside custom post type

Well, this should be pretty simple, however I couldn't find answer anywhere on the web. all answers I found were close but no exactly what I needed. what I need is to display just the current term of ...
1
vote
1answer
413 views

Getting Term ID from Term Name for WordPress Query

I am trying to get term ids from term name and cannot figure out why this code is not working. $excludes = ''; if($filtering_excludes) { $exclude_terms = explode(", ", $filtering_excludes); ...
0
votes
1answer
3k views

List all custom post type posts from a given category?

I have a custom post type myposttype and it's taxonomy is called myposttype_categories. myposttype_categories have multiple terms inside, such as foo and bar. The tricky question is - how do I list ...
1
vote
1answer
133 views

Echo custom taxonomy term name

I would like to echo out the term name from a custom taxonomy 'recipes' but all I get is the word "recipe" when it should say eg "pizza recipe". Is name the right argument here or I am mistaking it ...
0
votes
1answer
414 views

Display posts from an author using search parameters (not author template/query_posts)

Is there a way to retrieve a list of all the posts by an author using search (example: ?s&author=xxx)? I can't use query_posts or author template (don't ask why, take it as a condition). And it ...
1
vote
0answers
79 views

sql select for post_title and a term name

I'm having trouble trying to think out this SQL select I need to write; here's the gist: I'm programmatically creating posts by importing an excel file, so I'm in 100% sure of post titles, etc, since ...
0
votes
1answer
318 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 ...
1
vote
1answer
301 views

How to determine the depth of a term in a custom taxonomy?

I'm building a <select> dropdown to display a list of terms for a custom hierarchical taxonomy. How do I know the depth of each term? I'd like to add some indentation for child-terms (the more ...
0
votes
1answer
338 views

Get post terms with hierarchical relationships

I'm having a hard time getting a set of selected terms in a custom taxonomy presented in a specific way. I have a hierarchical taxonomy 'places' and a post with the tagged terms: England (x) - ...
1
vote
1answer
113 views

Filter taxonomy terms using multiple id in the edit-tags.php

I want to use the edit-tags.php search function with multiple term id's. For example, if i type into the searchbox something like this: #1245&6832, it should display these two terms in the results ...
3
votes
1answer
116 views

Excluding posts from a category but only if they're not in multiple categories

I am looking to exclude a category in Wordpress. I am referring to the Wordpress Codex page on wp_query but I am having the following problem: I want to exclude posts from category 1, but if a post ...
0
votes
2answers
297 views

Get terms in hierarchical taxonomy which are associated with page and are children of a parent term

I have a hierarchical custom taxonomy ("photos"), with 3 parent terms ("color", "location", "year"). Each parent term has several children terms. I have associated the "photos" taxonomy with pages and ...
0
votes
1answer
421 views

Some custom taxonomy child terms not showing in admin. Caching problem?

I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies. I successfully created my postype and hierarchical taxonomy and ...
0
votes
1answer
102 views

Function to delete a term when a custom post with the same slug is trashed

I have a function that whenever i add a new post in the custom post type "artists" it adds a new term with the same name in the custom taxonomy "artists". function ...
0
votes
1answer
52 views

Custom field drop down to set the term of the post when published

In my functions.php i'm trying to check if the user has selected a value in a custom field drop down and then set that value as the term of the post when it's published. I'm using the following ...
0
votes
1answer
174 views

Post to inherit custom category background image from parent

I have a custom field on a category where you can add an image. I have it as a background image to show on the category's archive page, like so: archives.php <body style="background:url('<?php ...
2
votes
2answers
64 views

Prevent Selected Terms Rising to the Top

When you're editing a post and select a child category or term, and update, the selected terms appear at the top ( leading to potentially confusing situations where 'foo' 'foo' and 'foo' are selected ...
0
votes
1answer
217 views

Taxonomy Drop Down with hierarchical view using $terms

I asked this on the Wordpress forum but dint get any replies now I hope I can ask it here. I found the code here My Code is: function exc_custom_taxonomy_dropdown( $taxonomy, $orderby, $order, ...
0
votes
1answer
535 views

How to Order a list of taxonomies? orderby?

I am using this code to fetch a list of child taxonomies. I want the order displayed to be alphabetical, but it is not! Any help in figuring out how to do it? I guess ordering it before returning it ...
0
votes
1answer
77 views

List related terms + taxonomies

I have a set of main categories for a set of products. All these products has additional taxonomies associated with them. On a product category page, is there a way I can get all terms in use for ...
1
vote
1answer
199 views

How to Make a Category Always Selected?

I'm trying to write a function to make certain terms of default category always selected. When the user is writing a new post, the term checkbox should be checked and he shouldn't be able to unckeck ...
2
votes
2answers
334 views

Dropdown: Display terms from B only if has relationship with a term A selected

I've googling for a solution for this issue and found nothing: I have some posts from a Custom Post Type (Restaurants) and its taxonomies ('city' and 'cuisine'). Whenever I create a restaurant post, I ...
0
votes
1answer
124 views

wp_delete_term or wp_delete_category?

Hi I need a simple piece of code to delete a category for a custom plugin, but I just found two function references that seems quite the same: Function Reference: wp_delete_term Description: Removes ...
0
votes
1answer
494 views

get a specific taxonomy term name

I need to print a specific term with its id. I get that for categories with this code: <a href="<?php echo get_category_link(1); ?>" title="<?php echo get_cat_name(1);?>"><?php ...
2
votes
1answer
257 views

Get terms that contain posts that in turn belong to other terms?

So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that? ...
3
votes
1answer
286 views

Retrieving custom taxonomy in order, but excluding specific tax IDs

I have a function set up and working based off the discussion in this thread: Custom taxonomy, get_the_terms, listing in order of parent > child. My version includes term links and allows me to ...
2
votes
1answer
209 views

Glossary with Custom Post Type

I´d like to make a glossary. It should looks like: Index-Nav 0-9 | A B C ... M ... X Y Z B BMW M Mercedes ... ALL entries from index-nav (A-Z, O-9) should be visible in a <ul> and should ...
4
votes
1answer
61 views

How to sort terms with diacritical signs?

I have list of terms which happens to be the Polish Alphabet. Here's how I list these terms: <ul> <?php $terms = get_terms("taxonomy", array('orderby' => 'title', 'hide_empty' => ...
1
vote
2answers
321 views

get_terms with more than x post count

Is there an argument for get_terms which I can fetch terms that only have say over 2 posts associated with it? I have a terms page which lists all my terms for 'artists', the page is huge but a lot of ...