Adding an Event List in Wordpress

  1. Use the [showpass_events type="list"] shortcode to automatically display a list of upcoming events on any page or post.
By default it will use the grid template, and the page_size will be 20. It will look something like the image below:
image.png
 

Parameters

You can use the following parameters to adjust the appearance of the Event List

Template Parameter

With this parameter, you can use the shortcode to display a default template provided by the Showpass plugin.
Accepted parameters
    • default: Grid view
    • list: list view
    • data: returns raw data to use in custom templates
ex. [showpass_events type='list' page_size='5' template='list']

If you wish to make custom templates for your event lists and detail pages use the following shortcode in your template files.
The shortcode returns JSON format data from API , so you can easily get it in page template with
<?php $data = do_shortcode('[showpass_events]'); ?>
Use the method above to generate your own custom templates using Showpass data.
Because it is JSON data you need to decode it
$data = json_decode($data) .
It will be received all data from API for the venue that is set from Admin Page ( organization ID ).
Screenshot 2023-09-27 at 10.34.23 AM.png

Type Parameter

The type parameter is required for this shortcode to work.

Type="list"

This type [showpass_events type="list"] will get all the data from the venue with the ID set on the Admin page ( organization ID ).
This type uses the default-grid.php as a base template - use the template="data" parameter to customize your own template.
ex. [showpass_events type='list' page_size='5']Screenshot 2023-09-27 at 10.34.23 AM.png

Type="detail"

This type [showpass_events type="detail"] will get the data from the event specified with the slug in the url.
This will by default use default-detail.php. Use the template="data" parameter to customize your own template.
ex. www.website.com/event-detail?event=123 or www.website.com/event-detail?slug=event_slug - will get all data for the event with id = 123 or with slug = event_slug . So ?slug in url is required for type="detail" type of shortcode. event parameter receive event ID or event slug (id or slug from API).
A further example on how this looks can be found here

Page Size Parameter

This parameter gives you choice for how many events you want to show on one page. This parameter is not required, and if you don't pass in shortcode, the default number of events on one page is 20.
ex. [showpass_events type='list' page_size='5'] - It will get only 5 events on one page.

Page Number Parameter

This parameter you can use to display your desired page number.
For example if you have a list of 30 events, and you have set page_size="5", the widget will display only 5 events on one page and you will have 6 pages with 5 events on each. So, with this parameter you can easily jump to the page that you want by passing the parameter through the website URL.
ex. www.website.com/?page_number=4 - will get all data (events) from page 4.

Tags Parameter

With this parameter, you can use the shortcode to display events within a certain category.
ex. [showpass_events type='list' page_size='5' tags='featured'] - It will get only 5 events on one page with the featured tag. For best results use one word lowercase tags. The example below shows events tagged with music.
Screenshot 2023-09-27 at 10.29.58 AM.png

Template Parameter

With this parameter, you can use the shortcode to display a default template provided by the Showpass plugin.
Accepted parameters
    • default: Grid view
    • list: list view
    • data: returns raw data to use in custom templates
ex. [showpass_events type='list' page_size='5' template='list']Screenshot 2023-09-27 at 10.34.23 AM.png

Page Redirect Parameter (Event Detail Page)

When using templates included by Showpass plugin, this parameter can be used to set the redirect location for the event detail page.
ex. [showpass_events type='list' page_size='5' template='default' detail_page='event-detail']
*Please note that this will require you to create a new Wordpress page with the url event-detail along with the type="detail" shortcode usage.*
 

Past Events Parameter

Use this parameter to show past events from the current date.
ex. [showpass_events type='list' page_size='5' template='default' detail_page='event-detail' show_past_events='true']

Event Ends On Parameter

Use this parameter to display events ending before or after certain dates.
ex. ends_on__gte will get events ending on and after the date specified.
ex. ends_on__lt will get events ending before the date specified.
*Please note that the date specified must be in ISO format YYYY-MM-DD'T'HH:MM:SS.SSS'Z', for example 2019-06-23T19:30:00.000Z.*
ex. [showpass_events type='list' page_size='5' template='default' detail_page='event-detail' ends_on__gte='2019-06-23T19:30:00.000Z']
This will display events ending on and after June 23, 2019 19:30:00.000.

Event IDs Parameter to Display Specific Events

This parameter will let you display one or multiple specific events using the type="list" template. Specify the IDs of the events you would like to display.
ex. [showpass_events type='list' page_size='5' template='default' detail_page='event-detail' event_ids='254,288,292']

Recurring Event Parameters

If you have recurring events, by using this parameter you can set whether or not you would like to display your recurring events or if you would like to display only the main event and not each recurrence.
hide_children='true' will not show any recurring events at all.
only_parents='true' will show non-recurring events as well as the main recurring events. When using only_parents='false' this will show non-recurring events as well as all occurrences of recurring events.
By default hide_children='false' and only_parents='true'.
The example below shows the child events with the hide_children='true' parameter.
Screenshot 2023-09-27 at 3.00.04 PM.png

Ordering Parameter

This parameter is used to manipulate the order in which the events appear in. By default, events will be ordered by start date, from earliest to the latest.
Accepted parameters
  • starts_on: Order events by event start date
  • id: Order events by ID number
  • name: Order alphabetically by event name
ex. [showpass_events ordering='name' type='list' page_size='5' template='default' detail_page='event-detail']
To reverse the order add - before the parameter.
ex. [showpass_events  ordering='-name' type='list' page_size='5' template='default' detail_page='event-detail']
This will order events by name starting from Z to A.

Show Widget Description Parameter

Use this parameter to hide/show the widget description panel.
* Please note that this will override the admin setting.*
ex. [showpass_events type='list' template='default' show_widget_description='true']
Screenshot 2023-09-27 at 1.54.48 PM.png
 
Screenshot 2023-09-27 at 1.55.07 PM.png

Testing & Show Parameter

Use this parameter for testing purposes. Using show='all' will show all events you have, regardless of their visibility setting.
ex. [showpass_events type='list' template='default' detail_page='event-detail' show='all']

Other Parameters

Additional parameters compatible with the Showpass plugin are listed below
  • query parameter - ?q=something
This parameter is for a search event. You need to pass it through website url ?q=something and it will get all events that have "something" in their content.
ex. www.website.com/?q=something .
  • tags parameter - ?tags=Rock
This parameter is for filtering events through the tags. You need to pass through the website url ?tags=tag_you_want and it will get all events which has that tag (category). This also works with multiple tags separated by commas.
ex. www.website.com/?tags=tag_one,tag_two
  • other parameters - ?stars_on__gte , ?starts_on__lt , ?ends_on__gte , ?ends_on__lt etc.
  • gte - greater than or equal
  • lt - less then
These parameters receive the date.