Widgets

Event Organiser comes with three widgets;


Event List Widget

This widget, quite simply, lists events. You can select which events you wish to appear by date, by venue and/or category. You can also provide a ‘template’.

The Event List ‘Template’

This is not a template file, but a placeholder for the events, where you can use tags such as %start% or %event_content%.

This placeholder is the same that can be wrapped around when using the event list shortcode.

For example

  • Fortnightly event on 18th December 2012 4:30pm
  • Delivering Presents on 24th December 2012 11:55pm
  • 4th Thursday Every 2nd Month on 27th December 2012
  • Event without pattern on 5th June 2013 2:25pm
  • Monthly event on 9th June 2013 6:39pm

can be achieved with

  <strong>%event_title%</strong> on %start{jS F Y}{ g:ia}%

The following template tags are available:

Event detail tags

  • %event_title% – The event’s title
  • %event_title_attr% -Same as above but sanitises the title for use as an attribute.
  • %event_url% – Link to the event’s page
  • %event_content% – Display’s the event’s content
  • %event_excerpt% – Display’s the event’s excerpt. Optionally set the the word limit: %event_excerpt{30}%
  • %event_thumbnail% – Displays event’s thumbnail. (Optional) the size of the thumbnail as a preregistered string keyword (thumbnail, medium, large, full etc). A second optional ‘attribute’ argument is passed as a string to to get_post_thumbnail().
  • %event_custom_field{key}% – Displays event’s custom field value for a given key.

Event date tags:

  • %start% or %start{date-format}{time-format}% – The event’s start date/time. The format of the date and time can be specified appropriately:

    //Format date in '18th February 2012' format. No time format.  
     $start{jS M Y}%
    
    //Format date in '18th February 2012 at 1:30pm' format. 
     $start{jS M Y}{ at g:i:a}% 
    
    //Format date-time in '1:30pm' (no date part) format. 
     $start{g:i:a}{}% 
    
    //Format date-time as given in WordPress' general settings. 
     $start% 
    

    Please note the ‘time format’ option is only used for non-all day events, and date/time formats can be used in either option. The date-time formats are those accepted by PHP datetime

  • %end% or %end{date-format}{time-format}% – The event’s end date/time. Similar to above.

  • %schedule_start% or %schedule_start{date-format}{time-format}% – The event’s series start date/time. Similar to above.

  • %schedule_end% or %schedule_end{date-format}{time-format}% -The event’s series last start date/time. Similar to above.

Event category & tag tags:

  • %event_cats% – Displays the list of the event’s categories with links to the category pages.
  • %event_tags% – Displays the list of the event’s tags with links to the tag pages.

Event venue tags:

  • %event_venue% – The name of the event’s venue
  • %event_venue_url% – Link to the event’s venue page
  • %event_venue_address% -Address of the event’s venue
  • %event_venue_postcode% – Postcode of the event’s venue
  • %event_venue_country% – Country of the event’s venue
  • %event_venue_map% or %event_venue_map{class}% – Google Map of the event’s venue. (Optional) specify as class for the map. This can be used to alter the size of the map.

Event Calendar Widget

This produces a similar calendar to the default calendar widget, but instead shows dates where events occur.

Category and Venue calendars

You have the option of filtering events by category and venue, and whether to show past events or not.

Long events

The default settings are to only show the first date of occurrences which span multiple days. Since 2.2 there is an option to ‘show long events’ which shows all days of the occurrence.

Styling

The mark-up of the calendar follows the default WordPress posts calendar. So out of the box, it should fit right into your theme. Various classes are added hover to allow you to tweak things:

Various classes are added:

  • Each day is given the class event – so you can change how your theme highlights these days
  • The current day is given the class today
  • Past dates are given the class eo-past-date
  • Future dates are given the class eo-future-date
  • The ‘padding’ cells before and after the month are given the classes pad eo-before-month and pad eo-after-month respectively.
  • Each day with an event is given the following classes depending on the events occuring on it:
    • eo-event-venue-[venue slug] – if the event has a venue
    • eo-event-cat-[category slug] – for each event category the event belongs to.

Any desired changes you should be made to you theme’s style.css (preferably child theme).

Calendar Links

By default dates on which an event starts link to a page listing events that are running that day. You can change this behaviour by using the following hook: eventorganiser_widget_calendar_date_link (see documentation ).

Since 2.2 an option has been adding allowing you to link directly to a specific event when that event is the only one for that day.


Event Agenda Widget

This provides an ‘interactive’ widget, that allows views to scroll forwards and backwards in time. It groups events in one of three different ways:

  • By date
  • By week
  • By month

There are two date formats. One is the format used for the date that groups the event (e.g. when grouping by the date you might want the format 6th December 2012 (e.g. jS F Y) whereas for grouping by month you may just want December 2012 (F Y).

The second format is used for each individual event – so it makes sense to display the part of the date that distinguishes events. For instance, when grouping by events this is the time – so you might use the format (g:i a for 2:30pm). When grouping by month, you may wish to show the day of the event: 6th (e.g. jS).