My other blog was a garden blog and so old posts have a high likelihood of becoming relevant again each and every year around the same time. I wanted a way to display a link to the blog post written nearest to the current date from each previous year. After not finding a plugin that did what I wanted, I wrote my own.
Todayish in History
The plugin is named Todayish because if there isn’t a blog post from today’s
date in previous years it will use the blog post which is the least
number of days away from todays date.
Todayish in History provides a function for use in themes as well as a
widget for use in your sidebar.
Download Todayish In History For WordPress
You can find a list all versions in the download directory.
You can also find downloads at Todayish In History @ WordPress.org
There is no online demo at this time.
Installation and Settings
- Unzip the todayish_in_history.zip file to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
Using the Todayish Widget
- Place the Todayish In History in a sidebar using the WordPress Widgets tool in the Appearence menu
- Change the settings if desired
Using Todayish in Your Theme
Add the following where you want Todayish in History to appear
<?php todayish_in_history(); ?>
You can also pass an array of settings to the function.
<?php $settings = Array( 'limit' => 100, 'title' => "Todayish In History", 'class' => 'horizontal', 'width' => '200px', 'iswidget' => FALSE, ); todayish_in_history($settings); ?>
All of the settings fields are optional. Here’s what they mean.
- parameter (default value, value type) — Description
- limit (100,int) — How many years of history to show
- title (“Todayish In History”,string) — The title displayed next to the dropdown
- class (horizontal,css legal string) — The class added to the outermost div for styling purposes
- width (200px,valid css width) — How wide should the dropdown be.
- iswidget (FALSE,boolean) — If TRUE adds class ‘widgettitle’ to h2 widget title
By default the dropdown drops directly down, and titles too wide for the
drop-down are truncated. To change this behavior so that the dropped-down list
is as wide as it needs to be, see the comment in todayish_in_history.css