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:
- categoriy - this will allow you to limit the calendar to only showing events from one or more categories
- 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):
The short code example below will show the "social" AND the "dinners" category in the large style:
[sc_events_calendar category="social, dinners"]<br>
The shortcode also accepts a type parameter that allows you to control the date range displayed. The accepted values are:
For example, to show a calendar that displays one week at a time, use:
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:
- $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.