-
Notifications
You must be signed in to change notification settings - Fork 3
Shortcode
The UCF-Events-Plugin comes with a prebuilt shortcode for displaying event lists within a content block. The options for the shortcode are very similar to those of the widget.
To include an events list with the default options, simply add [ucf-events]
to the content editor of the page or post you'd like the events listed on.
It is possible to override some of the default settings by adding attributes to the shortcode. For example, if you wanted to list 5 events instead of the default 3, you would update the limit
attribute:
[ucf-events limit="5"]
All of the attributes available have defaults that will be used if they're not overridden.
Option | Description | Default |
---|---|---|
title | The title that is displayed above the event list | Events |
feed_url | The JSON feed of the events you want to display* | http://events.ucf.edu/upcoming/feed.json |
layout | The layout to use for displaying the events list. Must provide the layout slug** | classic |
limit | The number of events to display | 3 |
offset | The number of events to skip in the feed. For example, set to 1 to skip the first event. | 0 |
* The JSON feed for a calendar can be found by clicking on the JSON feed button in the bottom right of each calendar page.
** You can see the available layouts for listing events on the Included Layouts page. You can also create Custom Layouts if the included layouts don't work for you.