Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress – Index & Home

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #35637
    tobeeornot
    Member

    Sorry if this is a silly question but what is the difference between these templates in WP, and should they just be the same?

    #92687
    chrisburton
    Participant

    Index is where your blog posts will show (site.com/blog) and home would be your homepage (site.com).

    However, you can make the index page your homepage.

    #92688
    tobeeornot
    Member

    So you don’t necessarily need to have an Index if you don’t have a blog per se? You can simply have the Home.

    #92689
    chrisburton
    Participant

    I’m not sure I would delete it, maybe you’ll change your mind. I think blogging is important, not just for others, but for you as well. It shows your progress.

    #92690
    Brightonmike
    Member

    No. You have to have an index. You’d do well to read up on wordpress template hierarchy.

    http://codex.wordpress.org/Template_Hierarchy

    http://www.doitwithwp.com/rundown-wordpress-theme-files-what-they-do/

    #92702
    tobeeornot
    Member

    @Brightonmike – thanks, I have just been reading that, hence my confusion. If you not using a blog but just using posts, what should it be used for if I have to have it?

    #92696
    tobeeornot
    Member

    Sorry to labor on this folks. So I can set the Index to be the Home page if I want to, provided the Index template is there at all costs? A Home template is therefore not required. All I need to do is assign the Index to the home page in the back-end if I want that as the basic set-up. Is that right?

    #92701
    tobeeornot
    Member

    @Senff – I sort of get it. But if you want Index to be the home page, that is fine? I notice you can’t assign the Index template to a page.

    #92709
    tobeeornot
    Member

    @Senff – Ok, I have assigned the front page to be the Home in the settings and it works fine. I am still a little unclear what the Index file should be used for if you are not using a blog?

    #92718
    tobeeornot
    Member

    @Senff – I totally get it now. That is a really clear explanation and I’m petty sure I have got my head around it. I really appreciate you going to lengths that you did in your last post because it wasn’t quite clicking before :)

    #92762
    TheDoc
    Member

    index.php is the fall back for ALL pages.

    For your home page, it’s recommended using either front-page.php or home.php. Never use index.php for your home page, it should be used as a ‘generic’ fall back.

    I always use front-page.php and set that page in Settings > Reading.

    #92767
    TheDoc
    Member

    I’m referring to the index.php in your theme’s folder. See here: http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

    You can use it as the home page as long as you keep the code basic. The second you start adding things to the template that are specific to the home page only, you should be using home.php or front-page.php.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Other’ is closed to new topics and replies.