-
-
Save kjohnson/a09ec4c87048d5dbd747 to your computer and use it in GitHub Desktop.
The Invisible Preview Page - Filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('template_include', 'my_preview_content' ); | |
function my_preview_content(){ | |
return "My Preview Content Here"; | |
} | |
add_filter('template_include', 'my_preview_template' ); | |
function my_preview_template(){ | |
return locate_template( array( 'page.php', 'single.php', 'index.php' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment