if ONLY is category and if is PLUS category
-
Hi, all. Hoping you could help me out.
I’m trying to to create a category sub-sorter without having to apply a million ifs for each category. I’ve managed to get it somewhat working, however, it’s nowhere near where it should be.
To achieve what I need to achieve, I need a way to turn this:
<?php if (in_category(‘CATEGORY NAME’)) { echo ” class=\”current\””;}?>
Into these two:
<?php if (is_category(‘SOLELY CATEGORY NAME’)) { echo ” class=\”current\””;}?>
<?php if (in_category(‘CATEGORY NAME + SECOND CATEGORY NAME COMBINED’)) { echo ” class=\”current\””;}?> (e.x.: http://site.com/category/category-name+second-category-name)
How do I do this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘if ONLY is category and if is PLUS category’ is closed to new replies.