Home > AI > Backend > Wordpress >

wp_get_object_terms

Example

$post_type = get_post_type();   
        $taxonomies = get_object_taxonomies($post_type); 
        $taxonomy_names = wp_get_object_terms(get_the_ID(), $taxonomies,  array("fields" => "names"));
        var_dump($taxonomy_names);

Leave a Reply