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.
}
Related Posts:
- How to change the case of all post titles to “Title Case”
- Post preview mechanism architecture
- Passing current cookies in wp_remote_get to get Draft Post Preview
- Dynamically add id to heading tags
- Post/Page Preview Template
- Confirmation box when submitting post for review
- Ajax Load More Posts in Category Page
- Publish pending article from front end with a button?
- List latest posts in WP-Admin
- Update all posts automatically when using post_meta
- Restrict users from editing post based on the age of the post
- Change slug with custom field
- Restrict access to post if it is currently being edited
- Getting an alphabetic post list with two letters onclick on letter
- Create new category upon save based on post information
- which action to hook to in order to perform post-publish action
- Strange switch_to_blog() issue
- POST from jQuery to PHP
- Enable commenting on front-end preview page for pending posts
- Search widget breaks when using multiple loops?
- $post object is null
- Advanced Custom Fields – Storing array value for further usage
- Function to show random posts from a category
- Post preview and oembed provider issue using polylang plugin with subdomains
- str_replace the_title(); blues
- WordPress version 3.8 – Preview button not working for editor
- Accessing post->ID outside of the loop for listing child pages
- how to set beforsend option in wordpress ajax methods
- Custom post preview without saving
- Display post category in foreach loop with category link
- WordPress Custom Fields (Checkboxes with multiple values)
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Most liked page not displaying posts
- How to make number of blog posts a custom field?
- Change target of view link in admin
- Creating a post from data returned from HTML form
- List authors with the last post title and order by last post date
- Display post category in foreach loop
- Page template is accessing the incorrect posts?
- Can’t get full post title if there a spaces in title
- Get post meta retrieving wrong value
- Adding a user’s ID behind the tag ref link address
- How can I remove the first two words and shorten get_the_title()
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Dark Bar at the top of wordpress page can’t be seen?
- How to add PHP code snippet to all Post pages?
- How to display only one category in a custom post type?
- Display message depending on capability outside loop
- Limiting the amount of posts retrieved by the loop
- How to get the next and previous image title from attachment or gallery?
- displaying the categories post
- Adjust the order for returned posts
- How To Use Custom Fields With .mp3 Links
- Defining ‘last’ class on foreach blog posts
- Categories Listing and Highlighting current category item
- A better code for no post format?
- Help Combine These Two PHP Codes
- Site/Post preview is not working on all social media
- Post preview in iframe without saving the post
- how to chang preview of list of articles of one category?
- Preview own posts if logged in
- How to limit the number of results for all query_posts on mysite
- Show a Category Specific Info Box
- How to get all the terms of a post
- Get first comment link on the post itself
- Latest news mini images
- User driven content problems
- How can i retrive the movies, trailers, news in a single page using search
- How can I create a menu items from meta box based on users input
- Older entries link within a category page
- How do I display a full post, not just an excerpt?
- Remove read more
- Insert new post for each user infinite loop error
- List direct children of page
- Unable to get posts with category on my page
- wordpress radio button on single post page
- How *not* to show the last post on the latest posts list
- Create post from form with image
- Exclude a ‘portfolio’ custom category?
- Display a custom field rating system in the front end
- get value from post to sidebar
- Echo author slug in post edit page
- Adding a content rating system
- WordPress + Polylang – Error 404 when trying to preview draft post on different language
- Accessing the post content with WP_Query
- Get the object ID by URL
- Add an image box besides featured image?
- Use Cron to modify posts via sql
- How to get rid of shortcodes in post content once and for all
- Print all the tags from a custom post type Please
- Is it possible to give the user the chance to select between two single template files to use in a post?
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Put page on Archived statut after end of publication date
- Display new posts categories in separated divs
- Point to a page when there is no results
- Show posts between two Custom Fields date
- How to display an icon when a new post is published and then remove it when a specific time past?
- WordPress limit post that subscriber can create
- Can`t Access Post Page After Migration