Get term id by slug wordpress —

Posted: January 17, 2015 in All Category, WordPress

$termid = $wpdb->get_var("SELECT term_id FROM $wpdb->terms WHERE slug='$type'");
Advertisements
Comments
  1. Sameer says:

    thanks nice query for me…………………….