0

Is it possible to hide content in Post Preview (that is not hidden when the post is published)? I have customised single.php quite extensively and there are a few elements that I do not want my authors to load up every time they preview their post.

1

There is the handy is_preview function.

So somewhere in your single.php.

<?php
if (!is_preview()) {
     // Show stuff that doesn't belong on a preview.
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.