This tutorial for members provides the code for 2 custom page templates with 4 to 6 custom fields.
- The 1st template is a bit like a front or home page template that replaces widgets areas with custom fields.
- The 2nd template displays full width content sections.
Here’s what the 1st page template looks like with sample text:
The template uses the Advanced Custom Fields plugin (ACF) to create the meta boxes which appear under the editor on all Edit Page screens using this template.
Here’s some of the fields the plugin adds to all pages using the template:
If you prefer not to install a plugin like ACF, you can hand code a meta box for each field.
The custom fields output within the page loop using the
.entry class however you can change the hook from
genesis_loop to another genesis hook position.
Here’s what the 2nd template looks like:
- After downloading the custom fields template zip folder below, unzip it and upload the page-custom-fields.php to your child themes root directory.
- Install the ACF plugin and import the advanced-custom-field-export.xml file using the plugins import settings.
Here’s the link to download both files.