Displaying the Calendar

The calendar of events can be displayed in several ways:

  • Using the short code: [sc_events_calendar]
  • Using the Event Calendar widget
  • Using the template tag: sc_get_events_calendar()

Using the Short Code

The [sc_events_calendar] short code will show a complete ajax enabled calendar of your events wherever you place the short code. The best place is on a page, such as one named "Events Calendar".

The short code accepts two optional parameters:

  1. categoriy - this will allow you to limit the calendar to only showing events from one or more categories
  2. size - this allows you to display a large or small calendar. A large calendar is default.

Using the short code like the example below will show a large calendar with all categories (non excluded):

[sc_events_calendar]
The short code example below will show only the "social"  categoriy and will display the small calendar:
[sc_events_calendar category="social"size="small"]

The short code example below will show the "social" AND the "dinners" category in the large style:

[sc_events_calendar category="social, dinners"]

The shortcode also accepts a type parameter that allows you to control the date range displayed. The accepted values are:

  • month
  • day
  • 4days
  • week
  • 2weeks

For example, to show a calendar that displays one week at a time, use:

[sc_events_calendar type="week"]

If no type parameter is specified, month will be used.

Using the Event Calendar Widget

This widget will allow you to show event calendats that display all events, calendars that show only a specific category, and also both large and small calendars.To use the widget, first go to Appearance > Widgets, then drag "Event Calendar" to the widget area you wish to display a calendar. Once the widget is placed, choose the size and category to show. If you don't want the calendar limited to a specific category, then choose "All".

Using the Template Tag

This option is for advanced users who wish to modify their theme's template files in order to show the calendar(s).

To show a calendar, you can use this:

echo sc_get_events_calendar();
The sc_get_events_calendar() function accepts to optional parameters:
  • $size = 'large'
  • $category = null
  • $type = 'month'

You can use the $size parameter to display either a "small" or "large" calendar.

You can use the $category parameter to show a calendar with events only from specified categories. The $category parameter can be a comma separated string of IDs or slugs, or an array of IDs or slugs.

The Events Archive

An archive view of events is available at http://yoursite.com/events

This archive will display events in the same format as your site's blog posts. The archive also supports filtering the events in order to control which events are shown.

  • All events: /events/
  • Upcoming events only: /events/?event-display=upcoming
  • Past events only: /events/?event-display=past

You can use the Events Filter widget to add links to the page for filtering events.