Did you know a WordPress theme can have multiple page templates and that you can choose which template is used for a page on Edit page screen in WordPress admin?
In WordPress admin the page template selection looks like this:
Page templates that appear in the dropdown are specified using a special PHP comment on the top of the template file:
Defining a page template in Pinegrow is very simple:
1. Create a template file
The easiest way is to duplicate index.html or page.html and modify it accordingly to our needs.
Don’t name custom page templates “page-<something>.html” because WordPress will think the template is used for a page with the slug <something>.
Instead name it according to its layout or use, for example two-columns.html, one-column.html…
Need more info about this? Watch the tutorial video about creating various templates for your theme.
2. Add “Define page template” action from “Template parts” section in WP tab to the BODY element of the template and set the name:
Since Pinegrow 2.4, please add Define page template action to the top node of the page in the outline tree (the node with the page name).
3. Export the theme
That’s it, we can now select the page template from the Edit Page Template dropdown:
Last updated on March 9, 2016 at 5:10 pm