• Resolved cmoseley

    (@cmoseley)


    Is there a way to check for multiple pages with is_page()?

    I want to make a menu highlight when say someone is on page 3 and 5 and thus I would go:

    <?php
    if (is_page(3 || 5))
    {
    echo ('class="red"')
    }
    ?>

    But that always returns true no matter what page I am on. Is there any way to check for multiple pages without writing an individual if statement for each page?`

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Checking for multiple pages with is_page()?’ is closed to new replies.