Add today’s date and holiday to WordPress blogs

Years ago i spent hours collecting odd holidays and putting them into a script that would display the date and the day’s holiday (serious and silly) on my site.  After years without it on my blog i decided to resurrect the script and add it to zieak.com once again.  It is surprisingly easy to do with WordPress widgets.

  1. Log into the administration area of your blog at something like  www.myblogaddress.com/wp-admin/
  2. On the left hand column part way down select “Widgets” under Appearance.
    Select "Widgets"

    Select "Widgets"

  3. In the center area of the Widget page click on “Add” next to Text.
    Add text widget

    Add text widget

  4. On the right side of the screen a new blue bar should appear with the label “Text” at the bottom of the list of Current Widgets.
    New text widget

    New text widget

  5. Click on “Edit” and label the widget “Today is…” or something similar.
    Name of the widget

    Name of the widget

  6. Open my holiday script and copy all of the text.  Then paste it into the next field.  Then click on “Done.”
    Paste holiday script into widget

    Paste holiday script into widget

  7. Drag the blue bar to the spot you would like the widget to appear in the sidebar of your blog.
    Drag the widget

    Drag the widget

  8. Click on “Save Changes” at the bottom of the right column of widgets.
    Save changes

    Save changes

  9. Republish your blog and you should now have a widget that displays the current date and at least one holiday for the day.
    Holiday and date displayed

    Holiday and date displayed

If you would like to have any holidays added to the script you can do it yourself by adding to the right line of the code (note that January is month zero so the rest are offset by one) or you can let me know and i’ll add it to the script for an updated version.

2 Comments

  1. That’s an interesting script, I’ve got it put up on my site.

  2. Dennis, thanks for adding my script! I maybe should ask that people do a blog post and have a link back so word can spread about it. Or maybe i should write it as an an actual widget that can be downloaded and installed.

Leave Your Comment

Your email will not be published or shared. 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>