Upcoming Events Widget (past events)

Upcoming Events Widget (past events)

Advanced options:

You can use the following syntax:

date_compare='>' date='-7 days' date_end='NOW' date_end_compare='<' order="ASC"

+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.

order: This is used to set the order of the events. Use the value “ACS” for showing the oldest first and newest last. Use the value “DSC” for showing the most recent first and the oldest last.

word: This is used to set how many words you want to show from the excerpt. This attribute uses an integer value.

number: This is used to set how many events you want to show in the Upcoming Events Widget. This attribute uses an integer value.

date_end: This is used to set the date for the last event shown. This attribute takes the date format YYYY-MM-DD. However, if you use the value “NOW” the shortcode will render events up until prior to today’s date.

Shortcode only showing events that ended the last 7 days

Use these attributes with any of the 8 templates for the Upcoming Events Widget.

[rhc_upcoming_events template="widget_upcoming_events.php" number="10" date_format="dddd MMMM d, yyyy" time_format="hh:mm tt" feed="0" showimage="0" words="25" date_compare="&gt;" date="-7 days" date_end="NOW" date_end_compare="&lt;" order="ASC"]

Shortcode showing Events that ended the last 7 days as well as Upcoming Events.

[rhc_upcoming_events template="widget_upcoming_events.php" number="20" date_format="dddd MMMM d, yyyy" time_format="hh:mm tt" feed="0" showimage="0" words="25" date_compare="&gt;" date="-7 days" order="ASC"]