Here is the dilemma I have, my theme options passes the custom taxonomy variable as an ID number, not the slug name. So instead of passing “news” it passses “4”.
I have this hard code that works:
$wp_query = new WP_Query(array('slidecat' => 'extra', 'showposts'=>$slides));
But this code only works with the slug. So if i replace the ‘extra’ with $slider_category which is the variable my select field in the theme options passes, the code doesn’t work.
If you have the taxonomy ID, then it’s easier to just query the database directly to get to the slug:
Of course the slug can be applied to different taxonomies, for example there could by a
categoryand apost_tagwith a slug named"hello". So it depends on howslidecatis implemented and which taxonomies are supported.