This Day In History 0.9 Released

This release adds the ability to use a shortcode in any post or page to display the list of events for today, just as you do in the widget.  This means that you can link directly to a list of events my setting up a page and adding the shortcode to it.

To add a list to a page just add the shortcode [tdih]

There are three optional parameters that you can use in the shortcode.

  • show_year.  This determines if the year is show for the events.  1 shows the year (default) and 0 does not.
  • show_types.  This determines if event types ate shown.  1 show event types (default) and 0 does not.
  • filter_type.  This allows you to enter an event type slug to show only those events with this slug (default is not to filter).

Examples

[tdih]  – shows years, event types and all events for today – same as [tdih show_year=1, show_types=1]

[tdih show_year=0, show_types=0] – shows all events for today without the year they occurred by event type.

[tdih filter_type='births'] – shows events for today (including the year) with an event type slug of birth.

 

 

2 Comments

  • Lars

    It would be great if in the next release one could choose a whole week, like “this week in history”. I think this is a wonderful plugin!

    • BC

      I think this is a nice idea and will try to implement it in the next major release. A week can be defined in a number of ways. An ISO week number. Today plus the next six days. Today plus three days in the past and three in the future. And so on. Do you have a preference for a particular type of week?

Leave a Comment

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>