Title: Cannot &quot;preview changes&quot; for custom posts
Last modified: August 21, 2016

---

# Cannot "preview changes" for custom posts

 *  Resolved [dberz](https://wordpress.org/support/users/dberz/)
 * (@dberz)
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/)
 * I have created a custom post type called “event-program” but I am unable to preview
   changes to individual post types via the wordpress admin “preview changes” feature.
 * The admin produces a preview link like: [http://site.com/event-programs/good_event/test-event/?preview=true&preview_id=74&preview_nonce=4b1476cab3&post_format=standard](http://site.com/event-programs/good_event/test-event/?preview=true&preview_id=74&preview_nonce=4b1476cab3&post_format=standard)
 * ..but I receive a “file not found” error when attempting the URL.
 * I see that if I remove the last part of the URL (&post_format=standard) I can
   see a PARTIAL preview of the page, but the full page contents do not render.
 * Any suggestions on how to get this preview to work?
 * Thanks,
    David
 * [https://wordpress.org/plugins/custom-post-type-ui/](https://wordpress.org/plugins/custom-post-type-ui/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914567)
 * I wonder if the permalink rules didn’t get properly flushed after you created
   the post type.
 * Could you just simply visit your Settings > Permalinks page, don’t need to hit
   save or anything, just visit, and then retry previewing the post?
 *  Thread Starter [dberz](https://wordpress.org/support/users/dberz/)
 * (@dberz)
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914656)
 * Thanks for looking Michael.
 * No, the suggestion above does not work. The preview feature sill fails to load.
   Note that my permalink structure is site to “[http://site.com.com/event-programs/sample-post/](http://site.com.com/event-programs/sample-post/).
 * Not sure if this is helpful, but when attempting to preview, the page first directs
   to [http://site.com/event-programs/wp-admin/post.php](http://site.com/event-programs/wp-admin/post.php),
   then pauses and errors out on: [http://site.com/event-programs/good_event/brooklyn-uncorked/?preview=true&preview_id=13&preview_nonce=d4b689ec9c&post_format=standard](http://site.com/event-programs/good_event/brooklyn-uncorked/?preview=true&preview_id=13&preview_nonce=d4b689ec9c&post_format=standard)
 * I’m especially puzzled by the fact the preview partially works if I remove the
   post_format=standard bit in the URL…
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914662)
 * That is a bit odd really.
 * Can you verify that it works with a custom post type that wasn’t registered with
   our plugin? If it does, then I need to figure out how to debug where the issue
   is coming from, otherwise it could all be getting caused by something else in
   your install.
 *  [Karthick Dev](https://wordpress.org/support/users/karthick-dev/)
 * (@karthick-dev)
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914766)
 * i have the same issue to my custom post , i add a custom post name realization,
   i added post in that and when i click the preview or view realization its not
   showing the page , can you help me for this ./realisation/added/?preview=true&
   preview_id=998&preview_nonce=38e62a1786&post_format=standard .
    It showing me
   the error like This is somewhat embarrassing, isn’t it? It looks like nothing
   was found at this location. Maybe try a search?
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914767)
 * Where are you getting the preview link from in the WP Admin?
 * My text CPT created with CPTUI is creating preview links like: [http://wp.dev/wp/3.9/?post_type=movies&p=66&preview=true](http://wp.dev/wp/3.9/?post_type=movies&p=66&preview=true)
 *  [filmmaker3000](https://wordpress.org/support/users/filmmaker3000/)
 * (@filmmaker3000)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914814)
 * I have the same issue. Try removing &post_format=standard. It worked for me. 
   Now I have to try and figure out how to remove it automatically…
 *  [robgnyc](https://wordpress.org/support/users/robgnyc/)
 * (@robgnyc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914818)
 * Any other resolution to this issues?
 * I can’t really have a client removing &post_format=standard from the URL.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914819)
 * Not sure I ever managed to recreate the issue, so I don’t have a solution.
 *  [robgnyc](https://wordpress.org/support/users/robgnyc/)
 * (@robgnyc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914820)
 * I would be happy to give you a login to my site to take a look if there is a 
   private channel to send it to you.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914821)
 * michael @ webdevstudios.com
 * I’m not convinced this is an issue specifically from our plugin, but I’m not 
   saying it’s guaranteed not either.
 *  [bbv](https://wordpress.org/support/users/bbv/)
 * (@bbv)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914822)
 * I was having trouble previewing my custom post type pages using the “Preview 
   Changes” button, too. Like you guys, “&post_format=standard” (where “standard”
   changed depending on the format I chose) was added to the end of the preview 
   URL and my preview page displayed “Page not found”. I tried what others mentioned,
   to manually remove that parameter from the preview URL on my browser’s address
   bar. The preview worked and looked as it should, but I needed a more permanent
   fix.
 * In CPT UI, I orginally had “Post Format” enabled under the Support setting for
   my custom post type. I first tried disabling it which caused the post “Format”
   section from the page editor to be removed and also stopped the post format parameter
   from being added to preview URL. However, I want to use Post Formats for my CPTs
   so that didn’t work for me. I reenabled Post Format support in CPT UI.
 * Then I noticed that my regular pages and posts did not have the post “Format”
   section in the page editor nor the option to enable it in “Screen Options”. I
   added that in my functions.php file and found that I still had the same issue
   when previewing pages using Post Formats. I searched Google whether it was possible
   to not have the post format parameter added to the end of the preview URL and
   arrived at this topic:
    [https://wordpress.org/support/topic/how-to-remove-post_format-parameter-from-preview-url?replies=2](https://wordpress.org/support/topic/how-to-remove-post_format-parameter-from-preview-url?replies=2)
 * It works perfectly. Here’s the full code I used inside php tags of my functions.
   php file:
 *     ```
       // enables Post Formats for regular pages and posts
       add_theme_support( 'post-formats',
       	array(
       		'aside',
       		'gallery',
       		'link',
       		'image',
       		'quote',
       		'status',
       		'video',
       		'audio',
       		'chat'
       	)
       );
       add_post_type_support( 'post', 'post-formats' );
       add_post_type_support( 'page', 'post-formats' );
   
       // removes the Post Format URL parameters
       function post_format_parameter( $url ) {
       	$url = remove_query_arg( 'post_format', $url );
           return $url;
       }
       add_filter( 'preview_post_link', 'post_format_parameter', 9999 );
       ```
   
 * If you don’t want post Formats enabled on regular pages and posts, you can use
   just Rick’s code from the linked topic and it will work as well.
 * So from what I experienced, I think this is a WordPress issue rather than CPT
   UI, but I could be wrong as I’m not that versed in coding and didn’t dig deep
   into the root of the problem.
 * Anyways, hope this helps!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Cannot "preview changes" for custom posts’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

## Tags

 * [custom post](https://wordpress.org/support/topic-tag/custom-post/)
 * [preview](https://wordpress.org/support/topic-tag/preview/)

 * 11 replies
 * 6 participants
 * Last reply from: [bbv](https://wordpress.org/support/users/bbv/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-preview-changes-for-custom-posts/#post-4914822)
 * Status: resolved