WordPress.org

Ready to get started?Download WordPress

Forums

Static Home Page Best Practices (3 posts)

  1. get_username
    Member
    Posted 1 year ago #

    I realize I set my static home page through the admin panel, and I set my custom-page-template.php for my "Home" page. Now, WordPress instructions state not to apply a template to the blog page, so how does the blog page know what to look like? If the answer is index.htm, should I just put the get_header, get_footer, get_sidebar, and a loop in the index.htm? If it's not the index.htm, what page affects the default blog posts?

    Also, what if my Blog page is supposed to look different than other pages? Is that all supposed to happen in the index.htm, or should I create a custom template for the blog page?

    So to recap on best practices, assuming I've got this right, it would be the following:

    • Static home page - Is set in admin panel, and uses template "page-home.htm"
    • Blog page - Uses index.htm by default, and should include the loop, get_header, get_footer, get_sidebar

    Am I missing something here? Is this how most of you are creating these two pages?

  2. Red Deer Web Design
    Member
    Posted 1 year ago #

    There are a few different ways of looking at it. Usually I would use a page-home.php for the home, and then also have a single.php and a page.php for posts and pages respectively. It all depends on how much each design varies. Maybe I'll just use index.php for all the pages too.

    You can get some more ideas here: http://codex.wordpress.org/Theme_Development

  3. get_username
    Member
    Posted 1 year ago #

    Thanks, bdbolin, for the response. Yeah, I read through that Theme Dev page, and it has a lot of useful info. I'm confused with the blog page in general because it says not to apply a template. That said, I think WordPress uses index.php as the default blog post page; therefore, modifying this page means you wouldn't have to choose a template for the blog page anyways, correct? It's just slightly confusing once you add a static page to the mix, but makes sense for the most part.

    Thanks,
    Burt

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.