Forums

[resolved] Confusion about Template Hierarchy, need help... (4 posts)

  1. ws5f3dj7
    Member
    Posted 2 weeks ago #

    Heya - I'm confused about the Template Hierarchy and I'm not having any luck reviewing the codex to resolve the matter.

    Basically, I understand that single.php displays a unique layout for pages that are showing a SINGLE post. I understand if that isn't there than it will use index.php. I also understand that in the Settings -> Reading section I need to select a page to be my "Posts Page" where all of my articles will display.

    Where I'm confused is after I have defined my "Posts Page", it's still utilizing index.php, when I need it to access a different template (but I'm not sure which one) SO I CAN DISPLAY a few RECENT POSTS AND also the CATEGORIES. Help!

  2. samboll
    moderator
    Posted 2 weeks ago #

    To have a "Posts" page, you have to have a static home page set
    then you would create an empty page titled "Posts"
    save it and then assign it as your posts page

  3. ws5f3dj7
    Member
    Posted 2 weeks ago #

    Hi Samboll - I actually already have my Static Page set to Home (/), and I also have my Posts Page set to Blog (/blog). Additionally, I have an "Archives Index" page (which I created while following Template Hierarchy instructions) that is utilizing my "Archives" (archives.php) template.

    But I still only get categories on my Archives Index (/archives-index - archives.php) page and articles without the categories on my Blog (/blog - index.php) page.

  4. ws5f3dj7
    Member
    Posted 2 weeks ago #

    Okay, so... I was told I need to create a page -> make that page the "Posts Page" (by selecting Settings -> Reading -> Posts Page -> "Example"). But I couldn't get it to work properly (though I understand I'm simply overlooking something, no one was able to tell me what though.

    So I duplicated archive.php and imported it into my theme directory - making the applicable revisions - and discovered that this page lists all of my posts (or whatever number you set in Settings -> Reading -> Blog Pages Show At Most...) with their titles (linked to the single post - which utilizes single.php for those of you who haven't referenced, or don't understand, the Wordpress Codex.), tags, comments, etc...

Reply

You must log in to post.

About this Topic