• I’m trying to create some themes where the sites are running the latest version WP 4.2.2

    The sites will have a static Home page, with posts appearing on another page called “Blog”.

    I want to have the home page (Index.php) show a slider where the header normally appears, with all other pages displaying a static header.

    The problem I have is that although I have created a template page for use with a static header, this doesn’t work when applied to the Blog page or any of the post pages. ??

    The Codex seems to suggest creating a template for blog page and posts called home.php, which I’ve done, but this is only partly successful.

    As you can see from this url,

    https://www.internetsquad.co.uk/testsite/blog/

    the blog page now show a static header, (which is good!) But it’s missing the metadata and navigation links for “Next post”. When clicking on links in the sidebar for Recent Posts, the slider now shows on each page!

    Here’s a link for the code of my home.php https://pastebin.com/PgUUsq1G
    It’s based on the template I made for the other pages, but I’m not really sure what I need to add in order to fix this issue.

    All I want is to show blog page and posts with a static header like all the other non home pages.

    Can anyone advise?

Viewing 1 replies (of 1 total)
  • Thread Starter magicalwonders

    (@magicalwonders)

    After battling with this for days, I’ve come up with what is a very simple solution. At least for what I want to achieve.

    I’ve edited the theme so that the index file has a normal header. Then created a template page with a slider effect.. In WP I’ve assigned the Template page to my Home page.

    Now the slider shows only on the home page, with the remaining pages displaying the header. The blog and post pages use the code for the index page, so only the header appears there as well. You can see the result at this test url for a limited time –

    https://www.internetsquad.co.uk/

    This would be handy information for anyone else trying to do the same thing. I can’t see this way of doing it mentioned in the Codex? If it is, then it’s been made much more complicated, and I’ve missed it!

    In plain English it seems to be a case of designing the Index page the way you want the blog and post pages to look. Then create template pages which can be assigned to home and other pages to change how they look. ??

Viewing 1 replies (of 1 total)
  • The topic ‘Custom template for blog page and posts issue’ is closed to new replies.