multiple is_page() (3 posts)

  1. baszer
    Posted 4 years ago #


    is it allowed to have 2 (or more) is_page() on your page?

    i have

    <?php if ( is_page(92) ) {
    echo 'page 92';
        } elseif ( is_page(93) ) {
    echo 'page 93';
    } else { echo 'else';} ?>

    what works ok, but when I add another is_page(92) on another spot, it only gives the else. So is it not allowed to have more is_page() ?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    You can have as many is_page() conditionals as you need. My guess is that its their placement or your logic that's causing the problem.

  3. baszer
    Posted 4 years ago #

    thank you for your answer, I think you are right, I now did it some other way.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.