Forums

if is not page id check (3 posts)

  1. solidcolour
    Member
    Posted 1 year ago #

    this works:
    <?php if (is_page('3907')) { ?>
    do nothing
    <? } else { ?>
    do something
    <?php } ?>

    as you can see if is that page it will do nothing, so how can i use a php if not for that:

    something like:
    <?php if NOT (is_page('3907')) { ?>
    do something
    <?php } ?>
    Is that correct??

  2. MAS
    Member
    Posted 1 year ago #

    <?php if NOT (is_page('3907')) { ?> is wrong

    try this <?php if(!is_page('3907')) { ?>

  3. solidcolour
    Member
    Posted 1 year ago #

    that works :) thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags