• hello,

    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() ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    Thread Starter baszer

    (@baszer)

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘multiple is_page()’ is closed to new replies.