Inserting terms in an Hierarchical Taxonomy

I’m really having a few issues with inserting terms. Here is my scenario: I have a taxonomy called veda_release_type: //Release Type and Region $labels = array( ‘name’=> _x(‘Release Types/Regions’, ‘taxonomy general name’ ), ‘singular_name’ => _x(‘Release Type/Region’, ‘taxonomy singular name’), ‘search_items’ => __(‘Search Release Types/Regions’), ‘popular_items’ => __(‘Popular Release Types/Regions’), ‘all_items’ => __(‘All Release Types/Regions’), … Read more

Get terms by taxonomy AND post_type

I have 2 custom post types ‘bookmarks’ and ‘snippets’ and a shared taxonomy ‘tag’. I can generate a list of all terms in the taxonomy with get_terms(), but I can’t figure out how to limit the list to the post type. What I’m basically looking for is something like this: get_terms(array(‘taxonomy’ => ‘tag’, ‘post_type’ => … Read more

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, wp_term_relationships tr WHERE p.ID=tr.`object_id` AND tt.`term_id`=tr.`term_taxonomy_id` AND (p.post_type=”recipe_cpt”) AND p.post_status=”publish” AND tt.`term_taxonomy_id` = 37 but no luck . can someone … Read more

get_posts assigned to a specific custom taxonomy term, and not the term’s children

Say I have the following taxonomy terms: Term 1 Term 1.1 Term 1.2 Term 2 Term 2.1 How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or Term 1.2? For example: $pages = get_posts(array( ‘post_type’ => ‘page’, ‘numberposts’ => -1, ‘tax_query’ => … Read more