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]
If you are new to working with custom templates, check out
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.