Sneak Peeks Widget

Updated June 23 2007 — added WP 2.2 Support, removed 2.0 support, added ability to restrict sneak peeks to specific categories.

The Sneak Peaks widget allows you to list some of the upcoming posts on your site to allow visitors to get a glimpse of what is coming and encourage them to return. The widget is very simple, but allows you to customize the title, number of posts shown and the display text of each sneak peek using some simple tags.

You can download it here:
Sneak Peaks Widget 1.7 (WordPress 2.1+)
Sneak Peaks Widget 1.6 (WordPress 2.0, 2.1)

Installation is very simple. Just unzip the .zip file and upload the .php file to your plugins/widgets folder. Activate it in your plugins menu and then go to your Presentation>Sidebar Widgets menu and customize to your heart’s content.

Categorized as:

45 thoughts on “Sneak Peeks Widget

  1. Pingback: WordPress Widgets » Blog Archive »

  2. Nice idea!

    I suppose it’ll even work with unwritten articles, just save an empty post with a future date – could even cajole me into writing more!

  3. Great idea for a widget! We could really use this, especially since we’ve got several different authors and people come daily to see what’s new. It’d be nice if people could also see what’s about to get posted. The problem is I can’t get it to work. I’ve got a draft article saved and ready to be posted next week. But it doesn’t show up in Sneak Peaks. Please see our site and let me know if you have any idea why it’s not working.

    Is there a way of making it display not only the title but also the author? Since these are the only tags I’m assuming not:

    Tags Availible:
    %t – Displays post title
    %d – displays time and day the post will be available
    %c displays the amount of time until the post is available

    How does Sneak Peaks know “time and day the post will be available”? Is it using the time/date stamp on the article itself?

  4. The problem is I can’t get it to work. I’ve got a draft article saved and ready to be posted next week. But it doesn’t show up in Sneak Peaks.

    It has to be published with a future date for it to show up.

    Is there a way of making it display not only the title but also the author?

    It can’t currently, but I’ll add in the ability within a day or two.

    Is it using the time/date stamp on the article itself?

    Yes, the plugin assumes that you write posts ahead of time and then just schedule them for later.

  5. Got it! We’re new to WordPress and didn’t realize that you could publish an article based upon the timestamp. Very useful feature!

    Using the %d function displays as “Coming 1164636009:” How do I get the time and date to display correctly?

    Also it doesn’t appear that Sneak Peaks is using our style sheet (CSS).

  6. The first part is fixed, but I’m not sure what you mean by not using your css. The plugin uses the default before and after the widget. Inside the widget it just uses an unordered list.

  7. The plugin does not work as it should in WP 2.1. I have lined up 3 posts for future dates but none of them are displayed in the widget. It worked like a charm upto WP 2.07. Even your site does not have any upcoming posts (but that could be because you are on a break). Please look into the matter and let me know of any workaround.

  8. I see you updated your plugin for 2.1 but I am still having problems seeing the sneak peek in action. Your file stamp is Nov-25 for the one I can download on your site.

  9. thanks for the update! it works great on WP 2.1 now. Your widget is something that should be just a default part of WP since it is great!

    My viewers just really love seeing the articles that I am planning to release in the future. This widget along with the countdown calendar plugin adds so much to a WP site.

    btw, something to note, if you don’t have any future posts, the widget will not display the Sneak Peek box on your pages. Which is also good because I don’t want people to think that because I have no future posts pending that stuff is not being worked on.. So out of sight, out of mind for those viewing!

  10. Pingback: Future Posts Calendar Plugin » Anthology of Ideas

  11. Nice idea! I think I may try this one out on my site along with your calendar plug-in. I have so many different posts and ideas that I get them all jumbled up and mixed up. I’ll post you a good review if all goes well.

  12. I’d love this plugin if it worked but it doesn’t seem to show anything in WP2.2. I’ve even tried calling the plugin and using it as a static plugin in my sidebar but still nothing is shown. Is there anything I can do to get it working as at the moment we are having to write future posts in a list in the sidebar and change it everyday, quite annoying due to the fact we have alot of posts lined up for the next few months. Are you updating it soon for WP2.2 or know of any workarounds? Any help would be a great help to us!
    Cheers,
    Ed

  13. I have the same problem as Ed, WP 2.2 and sneak peak doesn’t show a thing. Future Post still works awesome though, keep up the good work, you rock. My favorite plugins so far.
    Richard

  14. Doesn’t work for me :( Do you need over 5 upcoming posts for it to show posts? I tried changing that before when i had over 5 upcoming posts and it didn’t work then either :/

  15. I can confirm this works for me using 2.1.3. I was wondering how easy it was to actually link to the upcoming post in question? I’m actually using this funky widget to display upcoming events, so that when visitors click on the title, it will take them to the details page.

    The widget-customising interface does seem to take HTML, so I’m assuming what I need to do is use something like
    Coming in %c:%t

    Any help would be really appreciated! :D

    • It would be fairly easy to make a link, but WordPress won’t allow the future post to be displayed to a user, so it wouldn’t help.

      I’ve had enough people request it that I have considered creating an events calender version of this plugin.

      • Thanks for your helpful reply! Sorry to read about the limitations of WordPress, but I guess it’s also understandable!

        I’ve been searching on the WP support forums about future posts/timestamps, and was wondering if the new plugin would be able to support future display of events (with details from e.g. Custom fields?)

        Not being a programmer/php-savvy, the posts that looked rather useful included: this and this post(s).

        Either way, I’ll verymuch look forward to the potential release of an events calendar plugin! Thanks! :)

  16. Also, how easy is it to ask the widget to only call from posts from one(or a few) categories and not all of them?

    Thanks! ^^

  17. I didn’t really test this, but it should work.

    Open sneak-peek.php
    Find: foreach ($scheduled as $post) {
    Add After:

    global $post;
    if ( in_category('A Category ID Number HERE') ){

    Find:

    }
    	echo '</ul>';

    Add Before:}

    If you want multiple categories use if ( in_category('Category 1 ID Number HERE') || in_category('Category 2 ID Number HERE') ){

    • Aaron – thank you very much for your fast and helpful reply! I tried out both the single category and multiple category edits, but alas it doesn’t seem to be working fully on me.

      I know it’s sort of working because the div and title for the ‘sneak peak’ widget still shows up if there is a post within the specified category(ies). But the content doesn’t seem to want to show up (the part with ‘coming in x days, title of event’) so am not sure what I should change?

      Thanks again! :D

  18. That’s a nice feature. It not only makes the user return but also encourage me to really WRITE articles ;)

  19. I am using your plugin and I really enjoy the accountability of it. It’s like having a virtual boss that puts me on a deadline, but only I control the boss!

    That said, I am also using an events calendar that needs current or future timestamps. What happens is that this plugin interprets this as a post as well and it is causing problems.

    I see that there is a way to restrict to certain posts, but I have many categories. Is there a way to tell the plugin “do NOT display” if you are x category id?

    Thanks for you help and keep up the great work

    -Tempo

  20. I am having a problem….
    Not sure if it is related to the sneak peeks plugin, but I will let you decide.

    I have a post that should have posted on 12-10 and for some reason it says in the sneak peaks:

    Coming in 3 days:
    Want 2,400 pairs of biker sunglasses?
    Coming in 2 days:
    Can you believe this is classed as a motorcycle?
    Coming in 3 days:
    Vandem Productions introduces Baltimore Bike Clubs Gone Wild, the first of a series of dvd’s documenting motorcycle club’s culture, lifestyles, charity events and wild parties

    So it should have posted 3 days ago, I have checked the post and all looks good but it does not appear on the website for that day. but I “reposted” it with todays date and now it shows correctly. Is this related to your plugin or just maybe a glitch with WP?

  21. Hello, I like very much your plugins (I use Futur Calendar and Sneak Peaks) and I have some questions about this one. I am french so I tried to translate the php file for french reading users then send it in the plugins but it not seems to want to change. What have I to change to have another title than “Sneak Peaks” and “coming in” ?
    Thank you for an eventual answer.

    • The “Sneak Peaks” and “Coming in” are stored in the database, so if you translate them, only the default values change not the ones in the database.

      In the future, if someone using the French version activates it, the words sneak peaks will be in French by default.

    • On your website, once you translated the php file, you will have to go to the widgets control panel and edit the options for the sneak peaks widget to change the sneak peaks text on your website to french.

  22. I’m looking forward to implementing this.
    However, I don’t have widgets on my sidebar.

    What code do I need to insert to have this display on the sidebar?

    And is there a way to edit the options without having widgets activated?

  23. Pingback: Ð?ЯТÐ?Ð?Ð?РÐ?Ц » Blog Archive » Ð?иджеÑ? бÑ?дÑ?Ñ?иÑ? посÑ?ов Sneak Peeks

  24. Pingback: Top 4 WordPress Plugins - Events * eliZZZa.net * all about web 2.0 & web design 2.0 * alles über Web 2.0 & web design 2.0

  25. Pingback: Can Your WordPress Blog See The Future? Mine Can! | Philaahzophy

  26. Hello! I used this plugin and it is very nice, but now in WordPress 2.7.1, it does not work. Why – I can not find the answer? Maybe you do I recommend something? (calendar of future entries, I will not fit, unfortunately). Thanks in advance!

  27. Future post works great. WP2.8.5
    When downloading Sneak Peeks I only get sneak-peak.php file??
    No folder. I am looking forward to be able to use Sneak Peeks.
    Regards Kare

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>