[resolved] Reverse of is_page (4 posts)

  1. peiqinglong
    Posted 9 years ago #

    Greetings all! I'm stumped. I know I read this somewhere before, but can't find it now. So I have conditional statements I'm using, and I want to exclude specific pages. What is the reverse of is_page or how would I write it so I can exclude certain pages? Thanks!

  2. koeln
    Posted 9 years ago #

    Which certain pages?
    You will get the reverse of a function with ! (is not)

  3. Kafkaesqui

    Posted 9 years ago #

    To expand upon koeln's explanation:

    if( !is_page() )

    if( !is_page('not-this-page') )

  4. peiqinglong
    Posted 9 years ago #

    Ahhh perfect! What I was looking for, I'll give it a try and let everyone know how that works out!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.