Displaying Calendars On Your Site
Main Events Page
If you would like to show the Full Calendar on your main event page, you should go to the
Events > Settings > Pages tab in your admin dashboard and then open the
Events List/Archives panel. You’ll see an option called
Display calendar in events page?
If you are using the WP FullCalendar plugin then you’ll see a section for FullCalendar in the General Tab, which provides the
Override calendar on events page? option.
Widgets
There is a calendar
widget which you can use to display the Small Calendar in various widget areas of your theme. To add a calendar widget, visit your Appearances > Widgets page in your admin dashboard, and drag the widget called
Events Calendar to your desired sidebar.
Shortcode
You insert one single
shortcode into your post and page content to display a calendar, here is an example:
[events_calendar full=”0″ long_events=”1″]
This shortcode would create a calendar exactly like the calendar above, however, depending on where you inserted this it may stretch to fit the full-width. If you want to restrict the size of this calendar (for example, 250 pixels), you can wrap it in a div html element like so:
1
2
3 | </pre>
<div style="width: 250px;">[events_calendar full="0" long_events="1"]</div>
<pre> |
PHP Code
Requires knowledge of PHP and HTML. You can directly insert calendars using PHP into your theme files. Here’s an example equivalent to the sortcode and widget examples in PHP:
1 | echo EM_Calendar: utput(array('full'=>0, 'long_events'=>1)) |
Advanced Customization
Requires knowledge of PHP and HTML. If you want to make some changes to the structure of the calendar. You can do this by overriding the default calendar templates within your theme. The files you’ll want to move are:
- templates/templates/calendar-full.php – The Full Calendar
- templates/templates/calendar-small.php – The Small Calendar