[wp-pro] Re: in_category() help

Daniel Cameron dan at sproutventure.com
Tue Nov 11 00:22:14 GMT 2008


Anyone know how I can query for a cat_ID off a category_nicename?
I'm building a category template and I'm using something like:

<?php
if (in_category('CATEGORY-NAME')) {
load_template(TEMPLATEPATH . '/category-special.php');
}
else {
get_header();
load_template(TEMPLATEPATH . '/category-default.php');
}  ?>


but I have to use a cat ID and it's necessary I use the category name.

Any help would be appreciated, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-pro/attachments/20081111/e38cff35/attachment.htm


More information about the wp-pro mailing list