Get_cat_ID for Custom Taxonomy
-
Hello,
I try to hack my theme option, it’s save the “Name” of category by default.
But i change it to save the CustomTaxonomy Name.In the template file i got :
$slider = new WP_Query( array('post_type' => 'post', 'posts_per_page' => 1000, 'cat' => get_cat_ID( get_option('slider_category') ) ) );
I change this part to :
$slider = new WP_Query( array('post_type' => 'visite', 'posts_per_page' => 1000, 'regions' => get_cat_ID( get_option('slider_category_visites') ) ) );
But it seems Get_cat_ID is wrong… get_option(‘slider_category_visites’) is the RealName of my custom taxonomy… and it seems i need the id of it…
All functions that i found need a post id to give the terms->idDo you have some idea ?
Thanks
Pop
- The topic ‘Get_cat_ID for Custom Taxonomy’ is closed to new replies.