WordPress Plugin: Hello Event

Manage events and sell tickets through WooCommerce

Hello Event adds event management and ticket sales in an extremely easy way to any WordPress site!  Just drop in the plugin and you’re ready to go. Welcome to the “Hello World” for events!

With this plugin you can easily create and manage events (like concerts, training camps or competitions). The events you create have fields for location, start and end dates (and optionally times for events that are not full-day events) and can be presented in different formats, both in lists and in calendars.

If you have installed WooCommerce you will be able to generate and sell tickets with a simple click. On the event page a link will point to the tickets in WooCommerce and in WooCommerce there will be a backlink from the ticket to the event.

Hello Event supports different date and time formats and is of course multi-lingual and currently comes with translations for English, French and Swedish. More languages will be added, and if you want to add other languages yourself, you can easily do that for example with the help of the Loco plugin.

Hello Event is iCal compatible and the event pages will display an “Add to calendar button” to allow users to insert the event into their calendars. Locations are presented either with Google Maps or OpenStreetMap.

Although the plugin is perfect to be used by the non-technical site creator, it is also developer-friendly with shortcodes, hooks and all styling provided by CSS that can be overridden.

To enhance the organic SEO of your site, all pages that present events provide Structured Data descriptions of the event – see Google documentation on Structured Data.

With Hello Event you can now use WooCommerce and all its different payment gateways to handle the ticket sales! Easy peasy!

 

Installation and use

Install the plugin the usual way, either through the plugin page in your WordPress dashboard or download the ZIP file and install it. Activate the plugin on the plugin page in your WordPress dashboard.

Upon activation the plugin will create a custom post type for the events. If WooCommerce is installed it will also create a product category for event tickets. If WooCommerce is installed later, this category will be created automatically when needed.

On the plugin setting page you will be able to define the name of the event type. Default is “Event” but since this name may conflict with other custom post types you already have in your system,  you will be able to give it a different name, to keep the admin menu tidy and clear.

 

Presenting lists of events on your site

The internal name of the Event custom post type (slug) is “hello_event” and to see all the events defined on the front end of your site you can either use the standard WordPress archive facility by navigating to SITEADDRESS/hello_event, or – much better – create a dedicated page for this and use the shortcodes provided by the plugin to display calendars and/or lists of events.

Creating a dedicated page to present the events is very simple using shortcodes provided by the plugin. By adding the following content to a page, events will be presented in different ways:

  • In a calendar
  • A list of future events (limited to default 4)
  • A list of past events, limited to 2
  • As a tabbed list (one tab for past and one for future events). Each event is displayed in “full” format

 

[hello-event-calendar]

Future events:

[hello-event-list]

Past events:

[hello-event-list select="past" limit=2]

TABS:

[hello-event-tabs show="full"]

 

Presenting the events on your site

In the plugin settings you can choose to have the event information (dates, location, etc.) displayed completely automatically. Nothing could be simpler!

If you want more control over the page-layout you can deselect the parts that should not be automatically displayed, and use the shortcodes to  insert them where you want on the page.

Developers can of course create a dedicated template for full control.

 

Use WooCommerce to sell tickets

In the Tickets section when editing an event you will find a checkbox “Sell tickets in the shop”. By checking the checkbox and saving the event a WooCommerce product is created with the same name, short description and thumbnail as the event. A new link will also appear in the Ticket section “Edit ticket”. This link takes you to the product in WooCommerce.

Please notice that for the ticket to be available in the shop you need to give it a price and set its status to “published” from the WooCommerce product page.

By setting the “Manage stock” in the “Inventory” section of the product page it is also possible to limit the number of tickets available.

Once the ticket has been created from the event as described above, the event and the ticket will live separate lives and you may change the titles, descriptions and thumbnails independently. The only exception is that if you untick the  “Sell tickets in the shop” checkbox on the event page the corresponding product will be set to draft status and will not available in the shop. To make it available for sale again you should check the checkbox AND change the product status to “published”.

When you list the events in the WordPress admin area you will have direct access both to the tickets in Woocommerce and to the sales reports for each event.

 

Shortcodes

ShortcodeParametersDescriptionWhere to use
[hello-link-to-ticket]textReturns the text with a link to the ticket of the current event in the Woocommerce shop, provided that you have enabled ticket sales, defined a price and publsihed the ticket product in WooCommerceEvent page
[hello-start-date]idReturns start date of eventEvent page
[hello-start-time]idReturns start time of eventEvent page
[hello-start-date-and-time]idReturns start date and time ("full day" for full-day events)Event page
[hello-end-date]idReturns the end date of eventEvent page
[hello-end-time]idReturns end time of eventEvent page
[hello-end-date-and-time]idReturns end date and time ("full day" for full-day events)Event page
[hello-location]idReturns the location of eventEvent page
[hello-event-ics]idReturns a button that when clicked will donwload the event in the ICS formatEvent page
[hello-event-map]Returns a map presentation using the map service provider selected in the settings (eg. Google map or OpenStreet map) of the event locationEvent page
[hello-event-openstreet-map]Returns an OpenStreet map presentation of the event locationEvent page
[hello-event-google-map]Returns a Google map presentation of the event locationEvent page
[hello-link-to-event]textReturns the text with a link to the event of the current ticket, Product page
[hello-id-of-event]Returns the post id of the event of the current ticket, Product page
[hello-event-calendar]Returns a calendar of events.Event Archive page
[hello-event-list]limit, select, showReturns a list of events. OPTIONAL PARAMETERS:
limit: max number of events to show (4); select that can take the values 'past' or 'future' ('future') ; show that can take the values 'minimal, 'default' or 'full' ('default') to select how much information to show for each event
Event Archive page
[hello-event-tabs]limit, showReturns a tabbed presentation of earlier and upcoming events. For the parameters, see [hello-event-list]Event Archive page

Notice 1: Except for the shortcodes used on the Product Archive page, it is unlikely that you will need to use any of the other, since the plugin automatically inserts them in the appropriate places on the Event and Product pages. If you are a theme developer they may however come in handy.

Notice 2: Some shortcodes to be used on Event or Product pages can be used from other posts or pages by setting the optional ‘id’ parameter.

 

The Calendar of Events

Using the shortcode provided, the calendar can be displayed either on the Events Archive page that you have created or in a widget area e.g. in a sidebar.

On the plugin options page you can select the action to take when a user clicks on an event in the calendar. By default this will open a modal (using the jQuery UI Modal library) with short information about the event from the excerpt that you have written. If your theme uses Bootstrap you may choose to display a Bootstrap modal instead. As a third possibility, you may also choose to redirect the user directly to the event page. The calendar uses ajax to pull in the events in order to make it robust and scalable to a very large number of events.

 

Advanced feature: Sell different kinds of tickets to an event

By using Attributes and the Variable Products features of WooCommerce it is easy to create different kinds of tickets to the same event. Maybe you would like to include meals and transportation? Or maybe you would like to offer different seating areas for a concert? As an example we will show how to add different drink options to a cheese tasting event.

Step 1: Add custom product attribute for the product

In order to create product variations (i.e. different kinds of tickets for an event) we need first to create the product atribute that will vary across the variations. To do this change the Product data selector from “Simple product” to “Variable product”, choose the “Attribute” tab and click the “Add” button beside the “Custom product attribute” selector.

 

Then give the attribute a name: “Drinks” and define the possible values for the attribute, using “|” to separate the values. In our case “No drinks | Coke | Beer | Wine”. Set the checkbox “Used for variations” and click “Save attributes”.

 

Step 2: Create the product variations

To create the product variations select “Create variations from all attributes” under the “Variations” tab and hit “Go”.

 

As a result you will now see the following variations:

 

Step 3: Set the prices for the different variations

To be able to set the price of a variation, hover to the right of the variation name. Then click the small triangle to the left of “Remove” to show the variable editing form.

 

Fill in the variable price

 

Do the same for all the variations. Click “Save changes” and “Update” of the product.

 

Step 4: Admire the result

Errors and debugging

If you follow the guidelines everything should work. But if it doesn’t, don’t dispair. On the plugin settings page you can switch on debugging. As a result, you will get useful debug information generated by the shortcodes when you are logged in and have the WordPress capability edit_posts (i.e. any user role better than subscriber).  The debug messages include the following ones:

MessageMeaning
Tickets not fully configuredAt least one of the conditions for sales of tickets to the event is not fullfilled
Shortcode can only be used when displaying eventsYou have inserted the shortcode on a page or post which is not an event
Shortcode can only be used for products of the eme-event categoryYou have inserted the shortcode in a product (or a post or a page), which is not a product of the correct category
Product is orphanedThe product where the shortcode is inserted is not linked to from an event

 

Information to plugin and theme developers

The plugin provides integration hooks in the form of actions and filters. A brief overview is provided here.

Actions

ActionParametersDescription
hello_event_product_createdproduct_id, event_idA WooCommerce product has been created to sell tickets
hello_event_readyThe initiation of the plugin has finished
hello_event_link_to_product_deletedevent_idLink from event to WooCommerce product deleted (because the product has been deleted in WooCommerce)

Filters

FilterParametersDescription
hello_event_display_link_to_ticketevent_id, product_id, htmlFilter HTML output from the shortcode eme-link-to-ticket
hello_event_display_link_to_eventproduct_id, event_id, htmlFilter HTML output from the shortcode eme-link-to-event
hello_event_display_event_list$htmlFilter HTML output from the shortcode eme-list-events

There are many more hooks available, and the list is growing. The best place to find up-to-date information is the source code.

 

Credits

The plugin logo and banner are created from an image designed by Freepik