• Resolved Jim Bouton

    (@piersrueb)


    I’m trying a simple conditional statement based on what category a post is within.

    <?php if (in_category(array('cat1', 'cat2'))); ?>
        Do something.
    <?php else; ?>
        Do the default.
    <?php endif; ?>

    Can someone tell me what is wrong with the above.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category if else?’ is closed to new replies.