Using Page Templates with GravityView
Requires WordPress 4.7+
Do you have a page template you want to use with GravityView? A full-width page layout, for example?
WordPress 4.7 allows you to use your theme's page templates for GravityView! Learn more about Post Type Templates in WordPress 4.7.
Adding support just requires one small modification to your theme's template file:
Before:
<?php /* Template Name: Full-Width Layout */
After (notice the new Template Post Type
line):
<?php /* Template Name: Full-Width Layout Template Post Type: page, gravityview */
This will add a "Post Attributes" box to your Edit View screen that will allow you to select the layout:
Alternate method: the Custom Post Type Page Template plugin
Don't feel comfortable modifying your template files? Aren't you running WordPress 4.7? Here's another way to achieve the same result:
- Install the Custom Post Type Page Template plugin
- Go to Settings > Custom Post Type Page Template
- Check
gravityview
then Save Changes
- You should now see the box with available templates in Edit View