Public Post Preview (en)

Zur deutschen Beschreibung wechseln.

Enables you to give a link to anonymous users for public preview of a post (or any other public post type) before it is published.

Public Post Preview Screenshot
Checkbox in the Publish Metabox

Have you ever been writing a post with the help of someone who does not have access to your blog and needed to give them the ability to preview it before publishing?

This plugin takes care of that by generating a URL with an expiring nonce that can be given out for public preview.

The plugin generates an URL with an expiring nonce. By default a link “lives” 48 hours. After 48 hours the link is expired and you need to copy and share a new link which is automatically generated on the same place under the editor.

48 hours are not enough to me. Can I extend the nonce time? Yes, of course. You can use the filter ppp_nonce_life.
Example for 5 days:

add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
	return 60 * 60 * 24 * 5; // 5 days

Thanks to Hans Dinkelberg for his photo.

Eure Meinungen

  1. Halle Eavelynvor 2 Jahre

    I recently installed your Public Post Preview plugin but when I shared the link with someone there was a message that said “expired”. How do I make the link available for a longer period of time? What is the default time frame before it shows as expired? Looks like a great plug in if we can get it to work properly.
    Thank you,
    Halle Eavelyn

    • Dominik Schilling (Autor)vor 2 Jahre

      By default the link is available for 24 hours. It based on the WordPress Nonces API and exists for security reasons.

      If a link (the nonce code) has been expired you can copy the link again.

      If you really want to extend the time to can use the filter in wp_nonce_tick().
      For example:

      add_filter( 'nonce_life', 'ds_nonce_life' );
      function ds_nonce_life( $seconds ) {
      	return 60 * 60 * 24 * 50; // 50 days
  2. Marybeth Feutzvor 2 Jahre

    I am running WordPress 3.4.1 and Public Post Preview 2.0.1. The preview links are not working. If I am still logged into my account they work, but if I am logged out (or for other non-registered users) there is a 404 Not Found error. Any ideas on what is going on or how I can fix it? Thanks.

  3. Kerry Garrisonvor 2 Jahre

    Since the update yesterday links are no longer working and I get “The link has been expired!” and the formatting of the website is broken on that page. This was working quite well before yesterday’s update.

  4. Joshua Backesvor 2 Jahre

    I would like to say that im glad that this plugin has been picked back up again and is being updated. One feature that I miss from previous verisons in the ability to right click the link and then click Send Link. Is it possible to reimplement this feature?

    • Dominik Schilling (Autor)vor 2 Jahre

      That was not a feature of the plugin, more a feature of your browser. Since the link is now in a textbox the browser cannot provide this feature anymore.

      Currently there is no plan to restore it as a link. But maybe I can add a small linked icon after the textbox. The browser should detected this too.

    • Joshua Backesvor 2 Jahre

      I went ahead and changed the code in the my installation to the following for lines 169-172

      <a href="ID ) ); ?>”>ID ) ); ?>

    • Joshua Backesvor 2 Jahre

      Well that didn’t work. I just added the <a> tag around the link and placed the php for the link in the href.

  5. Jonathan Channonvor 2 Jahre

    I just installed it and whilst it works, my post has a border around it. Looking at the source its a div titled error. I think WordPress notices that you’re trying to view a unpublished post and tries to put an error around it

  6. Christopher Skyivor 2 Jahre

    “After 48 hours the link is expired”

    This has to be the most bizarre, unhelpful, and annoying “default” behavior of any plug-in I’ve ever seen. Why not just remove that feature?

  7. bill watkinsvor 1 Jahr

    i have installed the Public Post Preview and activated it. I do not see where the checkbox is to enable the actual link.

    I have screenshots of what I am experiencing if you send me an email address.


    • Dominik Schilling (Autor)vor 1 Jahr

      I have updated the screenshot. The checkbox will be visible in the Publish metabox after the post is saved once.

  8. Christopher Suttonvor 1 Jahr

    Really great plugin – I’ve been relying on it for a couple years now, fantastic.

    Thanks Dominik!

  9. NJvor 4 Wochen

    I understnad I can add the filter…sorry, but I am a real rookie. Is there somewhere imn particular in the edit box I add this?? I can see where the ppp_nonce_life is in the html…do I put it there. I really need to change it to several days.

    thanks-very helpful plug in for me.


Auch deine Meinung ist mir wichtig

Hey! Hier kannst du deine Meinung, Feedback oder Ergänzungen teilen. Bleib dabei bitte höflich.
Achte auch darauf, dass jeglicher Spam(versuch) kommentarlos gelöscht wird. Notwendige Felder sind mit einem * markiert. Deine E-Mail Adresse wird nicht veröffentlicht.