Post/Page Preview Template

You could use the conditional is_preview() to add a bit of extra content.

For instance, you could put this at the very top of your single.php right after the header is called – or you could put it in your header.php file if you want it shown at the very top of the page:

<?php 
if ( is_preview() ) { ?>
     <div>You're viewing a preview</div>
<?php } ?>

Hope this helps, best of luck!

Leave a Comment