WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Reverse of is_page (4 posts)

  1. peiqinglong
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

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

  3. Kafkaesqui

    Posted 7 years ago #

    To expand upon koeln's explanation:

    if( !is_page() )

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

  4. peiqinglong
    Member
    Posted 7 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

Tags

No tags yet.