The theme (look and feel) used for Sterling Adventures has been developed with lots of love and care! Although it probably still isn’t anywhere near perfect (or even working in some places – software is never bug-free), but I am fairly proud of it. 😳 So, I think some of it is now at a point where it’s worth shouting about, and possibly sharing…
A feature of the sidebar that I like is the ability to “bring back” posts from the past. That is, the blog chronology constantly pushes great content into the archives. This sidebar widget, Last Year, brings posts from this day, week or month last year back to the fore! It’s available as a download here.
All I ask is that you leave your greeting card here (i.e. leave a comment 😯 ) and credit the widget (i.e. include a link to this page) on your blog.
Instructions:
Just put the plug-in into your plug-in directory (if this doesn’t make sense it probably isn’t something you should be trying 🙂 ) and activate it. Then you can include the widget in your sidebar(s) using WordPress’ Presentation » Widgets administration page. There’s a single option; bring back posts from this Day, Week or Month last year…
But please note I will ask for a donation before I’ll look at “how to” questions, I can’t teach PHP programming for free.
Version History:
- 4.1 – Plus should be minus on first year.
- 4.0 – Collapsable years.
- 3.4 – Credit inclusion.
- 3.3 – Added credit visibility option.
- 3.2 – Widget argument hack/fix.
- 3.1 – Options update fix.
- 3.0 – Added support for many years.
- 2.0 – Added Sterling-Adventures plug.
- 1.0 – Initial version released to the wild.
v2.0
I have added a “Readme” file to help users of this plug-in. Good luck!
I’ve also added a credit in the code. This is completely hidden and shouldn’t affect site content. But if you must remove it just delete line 49 (starts with
<span ...>
).Great widget pluging thing 🙂 although it does seem to break my other widgets (well they still work, but I can’t edit any of the widget’s properties)
I have been a frequent visitor of this blog for some time now, so I thought it would be a good idea to leave you with my thanks.
Regards,
Jim Mirkalami
The plug in appears to pull everything from the past month no matter if i choose day, month or year…. any ideas?
Hi Daniel, are you sure you are saving the settings? Use “Save Changes” button on the Presentation > Widgets administration page.
I’ve got the same problem as Daniel. It’s a great plugin but it’s not working quite right for me. When I try and change it from past month to past day in the admin area, I get the following message:
“Fatal error: Call to undefined function: update_saved_widget_options() in ………….. /wp-content/plugins/last_year_widget.php on line 62”
I’m using 2.3.3.
Aff, are you using WordPress MU? I don’t think this plugin will work with the multi-user version of WordPress, although I haven’t tested it.
Nope mate. I’m using regular WP. Version 2.3.3 – the latest version.
I like your blog theme. I want to use it on my blog.
Can you please tell me from where I can download these theme?
Many thanks
Hi Dan, thanks for the compliment!
I have built the Sterling Adventures theme specially for this site. If you are interested in using it there will need to be some customisation done for you. Sorry. Let me know (via the Feedback link below) if you want to take that further…
very nice web site. My English is not so good, so I do not understandt it well, but it seems very good. Thanks
Hi,
I would like to use your plugin but need to use it with php code, not a widget. Is that possible?
Thanks!
Sue
Hi Sue, you could try
<?php last_widget(); ?>
in your php code. It will work, just hope it’s enough for your needs…I really enjoy your widget. Having posts from the past really helps not only my visitors but also me to look back at what was going on last year. Unfortunately, I’ve been having trouble updating the widget through the Widget panel on WP 2.5; after I click on Save, the screen refreshes to a blank page and all changes are lost. When I updated the widget to your newest version, I can no longer add it to my sidebar. Is there something that I can do to fix this? Thanks in advance.
Hmm, I haven’t used WordPress’ new “one click” plug-in upgrade yet so maybe that’s the problem. 🙁 I know it works the old way – download, copy to your plug-ins directory, etc. 🙂
Yup, the old way works. But when I’m in the Design -> Widgets manager, and then I attempt to add the widget to my sidebar (like I did before), then click on “Save Changes”, I get a blank screen. I’m wondering since this is the only widget I can’t add to my sidebar, if I should just hard code it into the sidebar template file itself. Is this possible?
It should work okay on the Design Widgets menu – it does for me with no problems. 😯
However, you could also include it in your sidebar template code – it’ll need some code something like:
<?php last_widget(array('name' => 'Main Sidebar', 'before_widget' => '<div>', 'before_title' => '<h2>', 'after_title' => '</h2>', 'after_widget' => '</div>')); ?>
Where the values above are used to mark-up before and after the widget and it’s title. Good luck!
Hi Pete,
I am wondering as I want to present the posts from the current week last year if I need to include syntax in my template tag?
Thanks!
Sue
You need to set the widget’s options, look in Design > Widgets. Good luck.