• I don’t understand why this doesn’t work…
    I am using a static front page.

    I don’t want to show content on the front page as well as on a page with page ID 112.

    When I use this code:

    <?php if ( !is_front_page() || !is_page(112) ) { ?>
    Content.
    <?php } ?>

    The content still shows on the front page and the page ID.
    When I use either of them seprately, it works. Why isn’t te above code working?

Viewing 1 replies (of 1 total)
  • Thread Starter wcp

    (@wcp)

    Instead of the OR operator I used the && and that works. Also used instead of is_front_page the is_page with the page ID of the static front page. But I’m sure is_front_page will work too.

    Here’s the code for anyone running in the same issue (4 is the ID of my front page):

    <?php if ( !is_page(112) && !is_page(4) ) { ?>
    Content.
    <?php } ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Do not show something on frontpage or page ID.’ is closed to new replies.