Mighty Mike Posted February 27, 2007 Posted February 27, 2007 Hi all, Hope someone can help me out here. I have an infobox which i would like to be shown when only on a certain category ie if category = x then display else do nothing? For the life of me i can not fiqure out how to do this, i can get it to display only when on a category page but i will appear on all category pages and i need it for only one. I have something like this in their at the moment if (isset($current_category_id) && (current_category_id > 0)) { now if i was to just change the "> 0" to say "= 78" that dont work for some reason and i get errors! Anybody know how to do this. Thanks Mike
rrrhythm Posted February 27, 2007 Posted February 27, 2007 Hi all, Hope someone can help me out here. I have an infobox which i would like to be shown when only on a certain category ie if category = x then display else do nothing? For the life of me i can not fiqure out how to do this, i can get it to display only when on a category page but i will appear on all category pages and i need it for only one. I have something like this in their at the moment if (isset($current_category_id) && (current_category_id > 0)) { now if i was to just change the "> 0" to say "= 78" that dont work for some reason and i get errors! Anybody know how to do this. Thanks Mike this is just a guess, but are you being sure to use the double equal sign: if (isset($current_category_id) && (current_category_id == 78)) {
Mighty Mike Posted February 27, 2007 Author Posted February 27, 2007 this is just a guess, but are you being sure to use the double equal sign:if (isset($current_category_id) && (current_category_id == 78)) { duh, silly me. thanks for that it works now. any idea how i would add in another category to that statement == 78,79,80 ??? cheers
Recommended Posts
Archived
This topic is now archived and is closed to further replies.