Custom Page Templates

Description

Every now and then, it is necessary to create a page template for a specific page layout – one that is drastically different than the standard page.php file. For example, the About page of a site may have a significantly different layout and content pieces than a standard interior page.

Start by copying the page.jade file and rename it something like page-about.jade. Add the Template Name to the top of the file:

- /* Template Name: About */

From there, create a new ACF Field Group and set it to that specific page template under Location Rules. (Page Template is equal to *TEMPLATE NAME*). Add whatever fields are necessary and build out the code to accommodate those fields. Lastly, in the WordPress back end, be sure to remember to set the Template to the appropriate name.

The most common use of page templates is to create a full-width page template. Sometimes a site will have a mix of pages with a sidebar, and pages without. Follow the above steps, then modify the code to remove the sidebar to create a full-width template.

MENU