Having trouble adding a new theme template

[ad_1]

I’m working on a site that somebody else made a custom template for. The theme has a number of template files that are used for various page layouts. As none of these templates quite work for the new page I am adding, I need to add a new template.

I have used my SFTP app to locate where the existing template files are and have created a new template file here by duplicating an existing template file. I’ve changed the comment on the first line and it now is selectable as a template on the page edit screen, however none of the code from the new template file is being read. So when I change the template to the new template all the options in the page editor (under the title) disappear, the template I was copying had quite a lot options.

Is there some other way I’m meant to create these template files?

[ad_2]
2 Comments
  1. I have simplified the template to just:

    <main id=”primary”>

    <?php

    // hero

    _get_template_part(‘templates/template-parts/_inner-hero’,

    [

    ‘hero’ => get_field(‘hero_section’),

    ]);

    ?>

    </main>

    This should load the Hero plugin editor on the page editor but it doesn’t load for this new template.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer