Forums

[resolved] Multiple Conditions? (2 posts)

  1. polkadotsarecool
    Member
    Posted 5 years ago #

    So, I was reading the codex, and saw this nifty bit about conditions. Now, I want to know if it's possible to have more than one condition specified. As in, if this is blah OR deedah, then do this, all on one line. If I want two different pages to do the same thing, but don't want to write two separate if statements, that sort of thing.

    I saw a thread similar, and everyone seemed to suggest making a new page template. I don't really want to do that.

    Is this possible though? If not, it's not too big a deal I guess.

  2. nomi
    Member
    Posted 5 years ago #

    I have multiple pages specified like this:

    <?php if (is_page(page1) OR is_page('page2')) { ?>
    
    <p>conditional stuff here.</p>
    
    <?php
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags