Forums

[resolved] Template fails on Posts page only (3 posts)

  1. blazemiskulin
    Member
    Posted 2 years ago #

    I've hit an odd snag and it's confusing me.

    I'm using a very simple theme for a business site. Everything pulls from the same index.php file (there is no "page.php" or "single.php", etc.) It does not have dynamic sidebars.

    I've created a template for the posts page which sets a custom sidebar (it shows archives which are not shown anywhere else).

    The template works perfectly if I assign it to a regular page, but when I assign it to the posts page, it doesn't. Instead, the default template is used.

    Anyone have an idea what might be causing this?

  2. figaro
    Member
    Posted 2 years ago #

    Just a "theory"...I haven't tried this, but, if you make a copy of your custom template and call it home.php...name the file home.php...then that may work. I have a "feeling" that when you use a static homepage and set a post page, the custom template is ignored in the post page and the index.php file is still used.

    But, home.php will take priority over the index, so copying and naming your custom template home.php should do what you want and still allow index.php to be used for everything else...again, theory on my part...I haven't tried it.

  3. blazemiskulin
    Member
    Posted 2 years ago #

    BINGO!

    Thanks. I never would have thought of that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.