taxquery taxonomy get terms

so if $trips_list is the sample trips section, and you want the sample trips to only show trips with the same terms – you’d find the current trips term and argue that in your WP_Query. // this trips terms $tripTerms = wp_get_post_terms( get_the_ID(), ‘reisezweck’); // if each trip only has one term (as its a … Read more

How to manage the links of a new taxonomy

I see two ways to do this: Automatically: by Matching AUTOR term name to TEAM post title Assuming the autor’s terms are the same as the custom post type team post titles, you could find the relation with code like: function show_product_autor(){ // get this woo-comm’s product author $authors = wp_get_post_terms( get_the_ID() , ‘autor’ ); … Read more

Custom post type category link + add to menu

try this, I believe this should allow you to have category taxonomy in menu and available in your custom post type. function custom_post_type() { $labels = array( ‘name’ => _x( ‘Post Types’, ‘Post Type General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘hotel’, ‘Post Type Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Post Types’, ‘text_domain’ ), … Read more

I can not call the categories of custom post type

get_the_category() is for getting the default post categories and get_the_tag_list() for the default post tags. For custom taxonomies you must use get_the_terms(), i.e. get_the_terms( ‘categoria-video’ ) and get_the_terms( ‘tag-video’ ) in your case. Note that these functions don’t print anything, they just return an array. If you check out the documentation for get_the_terms() you’ll find … Read more

transfer two existing taxonomy terms into one custom metabox

function my_meta_box(){ add_meta_box( ‘mymtx_div’, ‘This my own Meta box Only :-)’, ‘post_categories_meta_box’, ‘post’, ‘normal’, ‘high’, array( ‘taxonomy’ => array(0=>’moviestax’, 1=> ‘bookstax’) )); } add_action( ‘admin_init’, ‘my_meta_box’, 0 ); function post_categories_meta_box(){} This example migth help you.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)