Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get taxonomy term id from slug - WordPress

<?php 
    $term = get_term_by('slug', $slug, 'category'); 
    $name = $term->name; 
    $id = $term->term_id;
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #taxonomy #term #id #slug #WordPress
ADD COMMENT
Topic
Name
2+4 =