is_preview() should return true is it is a preview. Did you try the following on the page.php?
if(is_preview()){ echo "preview" }else{ echo "no preview" }
to check if the is_preview() function is working?
EDIT2: You could work your way around it and check for:
if($_GET['preview'] == true){}
Related Posts:
- How do I use the WP image functions in a page template?
- Conditional tag is_page with a custom post type
- What is the criteria for pluggable functions?
- WP_Remote_Get Not working
- How to overwrite / extent wordpress function is_email
- Use register_setting() in a loop
- How to edit the Tags within the image file URLs?
- the_posts_pagination() function returns missing page numbering on some blog pages
- Filter an WordPress Function in (general-template.php)
- Why There Is No “get content by ID” Function
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 9967617 bytes) in …\wp-includes\functions.php
- Login cookies blocked after customizing hashing method
- “Conditional query tags do not work before the query is run. Before > then, they always return false. “
- Override default password nag in WordPress
- Remove Actions/Filters added via Anonymous Functions
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How to add classes to images based on their categories?
- Compare post levels and user levels wishlist member
- Generating Responsive Background Image Sizes in PHP
- Change ul class=”children” for wp_list_pages?
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Set default options for inserting media
- Session is not starting
- Override a class function to include a custom template
- the_post_thumbnail fallback using hooks
- Hide WYSIWYG editor on certain templates
- Disable shortlinks like ?p=1234 to prevent scraping
- Redirect a list of URLs to another URL, using functions.php
- Debugging with functions.php
- Getting first Image from post
- Combine two different filter callback functions
- How to limit character length in BuddyPress function output [closed]
- Ordering posts by publish date not working?
- Is possible add icon in title posts only in specific tag?
- Wp_schedule_event functions.php
- How to install Segment on WordPress without a plugin
- How to search using ajax for exact phrase or words in an input field?
- Can’t generate thumbnail images
- Dashboard widget custom positioning?
- Display tags that only appear in one category
- Need help “sanitizing” a custom function that pulls category slug into body class
- How to get data from an array using get_user_meta()
- Space Not Being Generated in HTML Output?
- Auto Generated HTML source code formatting
- Do not show on homepage functions.php code needed
- Get Comma Seperated Taxonomy Linked Terms and Last Child Separated By “&” Instead Of Comma
- How to remove a specific word at the beginning of the content and add it to the end of the content
- $_Get and &_REQUEST Index Undefined on Functions.php
- Exclude Category ID in function
- get_terms and meta_value results blank
- get_template_directory_uri() links to child theme not parent
- Functions Filter Question [closed]
- get_template_directory() – references parent theme directory
- Function that prevents users from uploading photos more photos
- Dequeue scripts in IE7 only using functions.php
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- Featured Image keeps cropping
- Function Suddenly Stopped Working
- Prevent creating multiple image resizes in twentytwelve template
- Shortcode of a function
- Conditional function for excluding first image from content, not working
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- WordPress comment_form() does not display actual comments
- Message notification for user
- Create a CUstom Archive by Year, but just for a Single Category
- Is it possible to create a shortcode to link to a specific post/page where the tag is just an attribute?
- How can I connect to a second database and still be able to use wp functions like get_post_types()?
- Display Script in Header When URL Variable Present
- Render metabox gallery in frontend
- how to check if an element in an html file exists in another html file? [closed]
- What is the earliest Hook a Script can use?
- Trying to change widgets h-tags
- I want to display the sku in the product pages of my EDD website
- Getting value of variable from functions.php and debugging it
- Why does echo on functions.php not yield result in source code?
- Child theme, how to cut the functions.php file into several classes?
- use add_action in a shortcode (gravity form – WordPress)
- Setting Up Child Theme To Take Priority
- I want to customize the_posts_navigation function by replacing prev and next with images
- wp_footer hook causing text to show on bottom of page
- Shortcode displaying outside the div [duplicate]
- WordPress reading old version of functions.php, breaks site
- Get shortcode attribute value to another function
- Help with is_page() and calling css for specific pages in a Child Theme
- Child theme style.css didn’t work properly but the Customize Additional CSS did [closed]
- Instead of using $post, how do i get the thumbnail image of the $post
- List Most Read Posts from last 7 days (with custom post type and other meta queries)
- Preventing PHP Execution in Parent Theme
- get USER ID in functions.php using user_register action
- How to add an excerpt and read more link to a page?
- How to shorten code with function?
- WPDB function not saving
- Integrating custom API for post content into Admin interface & Public Website [closed]
- How to save custom made object in an array in a post meta field
- Get term count on a category page
- Remove Disqus JavaScript from homepage
- Missing argument 2
- Different ads on every website on multisite environment
- How to get variable from other function inside class function using add_action for Ajax call