Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hey everyone, a simple question.

Question

I need to add one more category: Events in the if statement along with News which is stated in the code. How can I add it? Thank You very much :)

Code

<?php if (in_category('News')) : ?> 
share|improve this question
    
I forgot, I could do an array :) <?php if (in_category(array('News', 'Events'))) : ?> –  jimilesku Mar 7 '12 at 16:15
    
If that was your answer, submit it and mark it as such. –  m0r7if3r Mar 7 '12 at 16:44
    
@m0r7if3r will do as soon as 8 hours passes as I don't have enough reputation points :( –  jimilesku Mar 7 '12 at 17:37

1 Answer 1

up vote 0 down vote accepted

This is the answer :)

<?php if (in_category(array('News', 'Events'))) : ?>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.