Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There is the handy is_preview function.

So somewhere in your single.php.

if (!is_preview()) {
     // Show stuff that doesn't belong on a preview.
share|improve this answer
Ah, I was not aware of that function, excellent! – Christine Cooper Jan 3 '13 at 13:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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