Adding Upcoming Events Widget to a page with Shortcode

Adding Upcoming Events Widget to a page with Shortcode

It is possible to insert the Upcoming Events Widget in a page, post or custom post type with a Shortcode. You can use the following arguments:

Please notice that all attributes are optional.

number: number of events to display
date_format: the date format. you can generate this from the date format options tool.
time_format: the time format.
post_type: if left blank it takes the events post type. if you are calendarizing a different post type specify it here, example post, or page.
template: the template model to use. possible values are

  • widget_upcoming_events.php
  • widget_upcoming_events_a.php
  • widget_upcoming_events_a_end.php
  • widget_upcoming_events_a_end_range.php
  • widget_upcoming_events_a1.php
  • widget_upcoming_events_agenda_b.php
  • widget_upcoming_events_agenda_b_end.php
  • widget_upcoming_events_agenda_b2_.php

The following templates require the Accordion Upcoming Events add-on for Calendarize it!

  • widget_custom_accordion.php
  • widget_custom_image_expands.php
  • widget_custom_date_tilts.php

calendar: a calendar slug, it will limit the output to events from this taxonomy.
venue: a venue slug.
organizer: an organizer slug.
taxonomy used with terms: add the slug of the taxonomy and then the specific term(s) in the taxonomy you want to display.
feed: 0 for not showing External Event Sources 1 for showing events from External Event Sources
words: max number of words to display in the description.
horizon: day, hour or end. If choosing day it will remove the events until the next day. If you choose hour it will remove the events by the hour. If you choose end it will remove the events when they end.
showimage: 1 or 0. Choose 1 to display the featured image.
loading_method: server or ajax. On some situations, choosing server may delay page loading, choose ajax to render the content after the page is loaded. By default, the shortcode is using Server.
auto: 1 or 0. If choosing 1, the widget will automatically display events related to the loaded page, if you are for example loading the calendar archive, it will then show events from that particular calendar.
premiere: 1 or 2. Choosing 1 will only display the very first instance of a recurring event set. Choosing 2 will show 1 event, that is upcoming, from a recurring set.
calendar_url: fill this with a page where you have set up the calendarizeit shortcode so that links will take you to this page instead of linking to the event page.
post_type: Add this attribute if you want to specify a specific post type. Add the value “events” if you only want to show events.  This is useful if you also use the Advent add-on.


Advanced options

You can use the following syntax to show past events:
+2 days 4 hours 0 seconds to display events that end in 2 days and 4 hours.
-2 days 4 hours 0 seconds to display events that ended 2 days and 4 hours ago.
last Friday to display events that ended last Friday
next Wednesday to display events that will end on next Wednesday.

[rhc_upcoming_events template="widget_upcoming_events.php" number="5" date_format="dddd MMMM d, yyyy" time_format="hh:mm tt" feed="0" showimage="1" post_type="events" taxonomy="calendar" terms="spartan-races"]

In the sample below we have used the following Shortcode.

Template widget_upcoming_events.php

Template widget_upcoming_events_a.php


Template widget_upcoming_events_a_end.php


Template widget_upcoming_events_a_end_range.php


Template widget_upcoming_events_a1.php


Template widget_upcoming_events_agenda_b.php


Template widget_upcoming_events_agenda_b_end.php


Template widget_upcoming_events_agenda_b2.php


You can log in and take the plugin for a test drive before you decide whether to buy it or not.

Username: DemoUser
Password: TryMeNow