Need to create a child page template on different folder
-
On Cerauno the page templates are on the root theme folder and dependent files on a subfolder called template-parts.
I need to create a page template not on the root theme folder but on a subfolder which has to be called templates. On the subfolder I created a file which is a copy on the nosidebar template but with a different name (full-width-page.php). Exact same code except the template name (Full Width Page).
When I go to select/asigned the template to the Page, it does find it. But when I click to show the page it does not execute correctly. I think it does not find the CSS style for the template.
I added this code to the Cerauno-Child Style.css:
.page-template-full-width-page-php .site-main, .page-template-nosidebar-page-php .site-main { float: none; margin-left: auto; margin-right: auto; }
This CSS works when the page template file is located on the child theme root folder.
The content should appear in the center of the page.
My page link is https://jetsms.esy.es/en/our-source/source-links/
- The topic ‘Need to create a child page template on different folder’ is closed to new replies.