This plugin adds a basic "upcoming events" calendar of links to Wordpress.
This plugin is useful for listing speaking engagements, upcoming social events, or other calendar listings which link outside of your site. It adds a special link category for “Events Calendar” with meta fields for location and date. Any links in this category can be displayed through a widget withoption to display all events or only future events, show in ascending/descending order, and options to show or hide link images and descriptions.
The Start Date and End Date fields are stored as text fields and can be entered as any standard php-readable date format (i.e. “Aug 1, 2010 5:00pm”, “10/4/11”, and “November 2012” are all acceptable, and will be ordered properly and displayed just as they are entered). The End Date field is optional; if included, it will display the dates as a range; if not, only the first date will be displayed.
There is an option to use dates exactly as they are entered (may look better in some cases, but doesn’t work very well for non-US English dates) or to use WordPress’s localized date formatting.
Styling is customizable through css: each field is given its own class. A basic stylesheet is included in the plugin, but feel free to modify that or delete it and use your own stylesheet to override. You can also copy the default stylesheet to your theme directory or a new directory called /wp-content/plugins/gad-events-custom/
to preserve any changes to make against future plugin/theme upgrades.
This section describes how to install the plugin and get it working.
/wp-content/plugins/
directory[eventslisting]
in a post or page (see the FAQ for parameters that can be passed).Short answer, yes. Choose those selections from the widget options form.
This plugin uses the php strtotime()
function to process the dates entered, which can handle a lot of date formats. “Next Monday”, for example, will be correctly computed on most servers (but will always refer to the next Monday in the future, not the next Monday from the time someone added the link). ’10/5/10′ will be interpreted as October 5, not May 10. But “10 May” will work as expected. PHP does not, to the best of my knowledge, recognize non-English dates in text format very well. “1 enero 11” will probably fail.
If you are having problems having your dates be ordered properly, it is most likely because the strtotime()
function is not able to recognize or parse your input. Try entering your dates in a simple format like MM/DD/YYYY and using the WordPress date format settings to display them.
Yes, you can add an additional link category and use it to store events. If the category you create has an id of 11
, for example, you can pull events from your own category using the shortcode [eventslisting link_category=11]
. At the moment, the widget will only pull from the default “Events Calendar” link category. If you create your own category, you will have to manage it yourself – the “Events Calendar” submenu page under “Links” will only show events in the default category.
As of version 0.3, you have the option to include or not include the default CSS styling. Take a look at the css file provided to see the class names that need to be styled. If you define those in the style.css
of your main theme, you can safely disable the default CSS, while will make your page loads a wee bit quicker.
As of version 0.4, you can also copy the existing gad-events-calendar.css
file to your theme directory and edit it there, OR create a new directory under /wp-content/plugins
called gad-events-custom
and copy the stylesheet there. This can help protect your style changes in case of updating the plugin in the future.
You can pass any of the same options to the shortcode that you can select in the widget. Here is the syntax for each of the options:
display_title
(false|string) The title, if any, to show before the list of events. Will be wrapped in an <h2>
tag if present.show_past_events
(true|false) Present for backwards compatability. Use show_events
instead.show_events
(“upcomingonly”|”allevents”|”pastonly”) Pretty much what it implies. Defaults to “upcomingonly”.show_descriptions
(true|false) Whether or not to show descriptions in the list of events. Defaults to true.show_images
(true|false) Whether or not to show link images, if present, in the list of events. Defaults to false.orderby
(ASC|DESC) ASC: Order events current to future, or past to future. DESC: Order events future to current (or past). Defaults to ASC.limit
(int) If present, the maximum number of events to show in the listing.link_category
(int) A different category to pull events from, other than the default “Events Calendar” category.So for example, if you want to include the five events farthest in the future in a post, this would be the shortcode to use:
[eventslisting display_title="Planning Ahead" orderby=DESC limit=5]
New features and bugfixes 2/4/11
New features 8/19/10
New features and bugfixes 8/8/10.
Minor bugfix patch 6/14/10 – fixed issue where plugin would fail if it wasn’t in a directory named wp-content/plugins
.
Minor bugfix 6/10/10. Replaced php shorttags from plugin file with full tags so that plugin will not give syntax errors on php installations with shorttags disabled.
New features and bugfix 5/19/10.
Initial release 5/11/10.