When the pre-form or post-form content is shown for Gated Posts, default templates are used. For most cases, these default templates do not need to be modified and simply need CSS styling to match the styling of your site. You can customize these templates using the below instructions.
Gated Post Pre-Form Customization
To customize the Gated Post pre-form template:
- Copy the file default template from
/wp-content/plugins/newfangled-gated-content/templates/nfgated-pre-form-content.php - Paste this file into your theme folder with this naming convention:
/wp-content/themes/[your_theme_name]/nf-templates/nfgated-pre-form-content.php - Make desired customizations to the file.
Gated Posts modify the output of the main content editor field. If your post does not use the standard WordPress editor field or your theme does not the ‘the_content’ function, you can use one of these alternate integration options to define the intro text:
- Divi
If using the Divi Builder plugin, add the ‘Gated Content Placeholder’ module to specify the intro text to appear above the form. - Shortcodes
You can also use the ‘gated’ shortcode to define the intro text to appear above the form.
[gated
]Complete the following form to access the whitepaper:[/gated
]
Gated Post Post-Form Customization
To customize the Gated Post post-form template:
- Copy the file default template from
/wp-content/plugins/newfangled-gated-content/templates/nfgated-post-form-content.php - Paste this file into your theme folder with this naming convention:
/wp-content/themes/[your_theme_name]/nf-templates/nfgated-post-form-content.php - Make desired customizations to the file.
Gated Posts modify the output of the main content editor field. If your post does not use the standard WordPress editor field or your theme does not the ‘the_content’ function, you can manually display the protected content in your customized template by:
- Use the function $nf_gatedcontent->is_content_gated() to determine if the current post should show the form.
- Go to Settings > Newfangled Gated Content > General Settings and check the Manually Control Protected Content Display checkbox.