Answers for "wordpress get taxonomy id from post"

PHP
7

wordpress get taxonomy of a post

//Get all terms (names) of a taxonomy of a post
$term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
Posted by: Guest on July-09-2020
0

get taxonomy term id from slug - WordPress

<?php 
    $term = get_term_by('slug', $slug, 'category'); 
    $name = $term->name; 
    $id = $term->term_id;
?>
Posted by: Guest on September-23-2021

Code answers related to "wordpress get taxonomy id from post"

Browse Popular Code Answers by Language