WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Conditional Statement Help (2 posts)

  1. neoian2
    Member
    Posted 6 years ago #

    I want to use a PHP IF statement on only certain pages and on pages that aren't defined I want another piece of code to run. How Do I do this?

    I know 'is_home' but how do I define a certain page? Like say my about page?

  2. btard
    Member
    Posted 6 years ago #

    You can get the ID of the page/post and test against "the_ID". http://codex.wordpress.org/Template_Tags/the_ID

    That is one way. I am wondering why this topic is resolved with no replies?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.