My Computer Back in Service

“Make Your Computer Smile Again!”

happyscreen.JPG

Want Post Preview Back in WordPress?

newwplogo.png

If you’re like me and prefer having an inline Post Preview, instead of having to go through the extra step of clicking preview>> and having it open in another window. There is a little bit of code you need to add to WordPress on your Host Server.

You have 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* the code below.

Here’s the steps you will need to know…

  • Open up your post.php file from your wp-admin directory.
  • Navigate to approximately half way down and find the following line of code:
  • include('edit-form-advanced.php');

  •  Directly underneath that line, add the following code:
  • ?>
    <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

  • Save your changes to post.php.

There, Done… Simple, huh?

Now you can view a preview of the post you are working on without going through all those extra steps. (Remember, you Still have to Save and Continue Editing for viewing)

*If Copy & Paste doesn’t work, you may need to actually TYPE the code, but it does work.

Source: Will Lee

Share and Enjoy:
  • Digg
  • StumbleUpon
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter
  • Google Bookmarks
  • Print
  • email

3 Responses to “Want Post Preview Back in WordPress?”

  1. [...] to my RSS Feed or if you prefer … Subscribe via eMail. Thanks for visiting!In the post about Putting Post Preview Back the other day, I had an “*” for the Copy & Paste process to use the code I had [...]


  2. sandrar

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.


  3. Joe Hauckes

    Hey Sandrar,
    Thanks, I appreciate you stopping by. Hope you find some helpful info here and come back soon.

Leave a Reply

  • From the Archives

  • Subjects

  • Look-up Posts by Date

    March 2010
    S M T W T F S
    « Feb    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031