Forums

[resolved] Static Front Page and Posts on a Page - Custom Template Not Working (3 posts)

  1. mrengy
    Member
    Posted 1 year ago #

    I'm developing a theme from scratch locally.

    I followed the section in the Codex for "How can I have a static front page and posts display on a page called Blog?".

    I had to switch to the default theme, and switch back to my new theme in order to get the custom template to show up. Then I was able to select the custom template called "Blog-Archive" for the "blog" page.

    But the template is clearly not being called on the blog page. It is using a default template. I put in static code into the "Blog-Archive" template file (blog-archive.php) to see if it loaded in the "blog" page, and it did not.

    Header for the template file (blog-archive.php) reads:

    <?php
    /**
     * @package WordPress
     * @subpackage bxd_Theme
     */
    /*
    Template Name: Blog-Archive
    */
    
    get_header();
    ?>

    I'm stumped. Any help would be greatly appreciated.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Your main Posts page will always use your theme's index.php template file - so that's the file you need to customise.

  3. mrengy
    Member
    Posted 1 year ago #

    That was it. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic