WordPress.org

Support

Support » Themes and Templates » Single.php and page.php?

Single.php and page.php?

  • Hi everyone. We’re trying to learn how make templates and was wondering what the function of single.php and page.php was? Index, header, footer, comments and searchform.php all make sense, but we can’t figure out what single and page.php are needed for.

    Can anyone briefly explain what thier purpose is? Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Single.php is for single posts. In the blog portion of your site, the headers are all inks. Single.php is the layout you see when you want to view just that one single post. If you don’t make a layout for it, it uses the default.

    Page.php is for your Pages (static wordpress Pages). Again, if you don’t make a different template for Pages, then WP uses the default.

    In the blog portion of your site, the headers are all links.

    Shouldn’t that read ‘titles’? Doesn’t clicking on the header area always take you back to the index page?

    Shouldn’t that read ‘titles’? Doesn’t clicking on the header area always take you back to the index page?

    I was thinking of code. Your titles *are* headers (<h2>).

    And no, it doesn’t always take you back – only does if you have it set to do so.

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    webdressing: It would probably help you to read this:
    http://codex.wordpress.org/Template_Hierarchy

    That looks great Otto42. Thank you for the link, I really appreciate it 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Single.php and page.php?’ is closed to new replies.