How to get_term_meta on single custom post?

You will need to use get_the_terms() to get the taxonomy terms associated with the post and loop through them until you find one that has an image set: $post. = get_queried_object(); $terms. = get_the_terms( $post, ‘taxonomy_name_here’ ); $image_url = null; if ( $terms && ! is_wp_error( $terms ) ) { foreach ( $terms as $term … Read more

A function to add arguments to a taxonomy

Use the filter register_taxonomy_args to manipulate the arguments used for registering the taxonomy just before it is registered: function wpse_406824_vendor_taxonomy_args( $args, $name ) { if ( $name === ‘dc_vendor_shop’ ) { $args[‘show_in_rest’] = true; $args[‘query_var’] = true; $args[‘show_ui’] = true; } return $args; } add_filter( ‘register_taxonomy_args’, ‘wpse_406824_vendor_taxonomy_args’, 10, 2 ); You’ll need to place this … Read more

How to list tags from custom post type attachments?

get_the_tags() function in deed returns only terms of ‘post_tag’ taxonomy (tags). If you’d like to get terms of another taxonomies, you’d have to use get_the_terms function (http://codex.wordpress.org/Function_Reference/get_the_terms) $custom_post_tags = get_the_terms( get_the_ID(), ‘type’ ); //type is a name of custom taxonomy or you can use wp_get_object_terms function (http://codex.wordpress.org/Function_Reference/wp_get_object_terms) where you can define more than one taxonomy … Read more

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