WordPress.org

Ready to get started?Download WordPress

Forums

is_page multiple pages (2 posts)

  1. glidem
    Member
    Posted 6 years ago #

    This works:

    <?php if (!is_page(3)) { ?>

    <?php if ($p > 0) { add_count($p);}?>

    <?php } ?>

    But this doesn't, what am I doing wrong :(

    <?php if (!is_page(3) || (!is_page(14) || (!is_page(5) || (!is_page(10) || (!is_page(8) || (!is_page(55) || (!is_page(18)) { ?>

    <?php if ($p > 0) { add_count($p);}?>

    <?php } ?>

  2. elphi
    Member
    Posted 6 years ago #

    i think the problem is those "parenthesis". try this:

    <?php if (!is_page(3)) || (!is_page(14)) || (!is_page(5)) || (!is_page(10)) || (!is_page(8)) || (!is_page(55)) || (!is_page(18)) { ?>

    <?php if ($p > 0) { add_count($p);}?>

    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags