Fix for WordPress Post Preview
Some of you may remember my little rant on Saturday about the shortcomings of WordPress 2.2. I was complaining a bit about some of the changes they made with Spacing, Widgets and most of all Post Preview.
I missed my inline Post Preview, and thought the extra step of clicking preview>> and having it open in another window was totally ridiculous. However, Randa Clay mentioned in comments that Will Lee had a fix on his blog, Internet Marketing Fool.
You need to be comfortable working in the background code of your post.php, but it is fairly simple to do. Go to the wp-admin folder on your server, find your post.php and copy & paste.
Here’s the steps Will suggests…
- Open up your post.php file from your wp-admin directory.
- Navigate to approximately line 63 and find the following line of code:
- Directly underneath that line, add the following code:
- Save your changes to post.php.
include('edit-form-advanced.php');
?>
<div id='preview' class='wrap'>
<h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?></h2>
<iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
</div>
<?php
It really does work, and now I am a little bit happier using WP 2.2. And I would like to thank Will Lee for sharing this code with us to overcome another inconvenience caused by “upgrading” WordPress.
Update: If you Upgrade to WordPress 2.2.1 you will have to perform the same procedure in order to get your Post Preview. It Does Work on the new version as well.
Technorati Tags: WordPress, Post Preview Fix
New Here? You may want to Subscribe to my RSS feed for daily updates. Or if you prefer, Subscribe by Email What is RSS? Thanks for visiting!
Related Posts:








My Skype: joe.hauckes