Answers for "get taxonomy term id from slug - WordPress"

PHP
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 "get taxonomy term id from slug - WordPress"

Browse Popular Code Answers by Language