WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to identify whether rendering page or post? (3 posts)

  1. sweth
    Member
    Posted 9 years ago #

    I'm experimenting with the Pages in 1.5, and would like to have the template used for the Pages be almost identical to that used for regular posts. Is there an easy way for me to, in index.php, know whether I'm currently rendering a Page or a Post?

    TIA,

    Sweth.

  2. skippy
    Member
    Posted 9 years ago #

    The conditional tag is_page() is what you want to investigate.

  3. sweth
    Member
    Posted 9 years ago #

    That's exactly what I was looking for. Thanks much!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.