Filter Preview Template Path

Change the page template used to render the live preview.

Code

Filename: gplp-filter-preview-template-path.php

<?php
/**
 * Gravity Perks // Live Preview // Filter Preview Template Path
 * https://gravitywiz.com/documentation/gravity-forms-live-preview/
 *
 * Change the page template used to render the live preview.
 */
add_filter( 'gplp_preview_template', function( $template ) {
	return get_stylesheet_directory() . '/custom-template.php';
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.