just wondering
Member
Posted 10 months ago #
I'm trying to get the category ID # to use in a switch statement.
I've searched and have found a few things but can't get them to work.
Basicly what I'm testing is this
$category_id = get_cat_ID();
echo "$category_id";
Also do the permalinks effect this?
Any pointers would be appreciated, Thanks
is this in a category archive page?
then try:
$category_id = get_query_var('cat');
if you are not clear with wordpress functions, look-up the codex:
http://codex.wordpress.org/Function_Reference/get_cat_ID
just wondering
Member
Posted 10 months ago #
Thanks, that worked
I had look at http://codex.wordpress.org/Function_Reference/get_cat_ID
but couldn't get those examples to work.
Thanks again