Events Manager Elements for WPBakery Page Builder
The WPBakery elements need Events Manager 7.6 or later.
Events Manager adds its own elements to WPBakery Page Builder: Events List, Events Calendar, Event Locations and, with Events Manager Pro, Event Bookings Cart. You add one to a page from the Add Element panel, set what it shows in its settings window, and the page shows your real events as soon as you save the settings.
The elements are part of the free Events Manager plugin. They have the same settings as the Events Manager blocks and print the same HTML, so a list styled for one looks the same in the other. The Page Builders page compares the builders Events Manager supports.
The elements were tested with WPBakery Page Builder 9.2. WPBakery has to be active; Events Manager adds the elements when it detects it and loads nothing for WPBakery otherwise. WPBakery is switched on for pages by default. To use the elements on another post type, add it under Post types in WPBakery Page Builder then General Settings.
Where the elements are
Open Add Element, the plus button in WPBakery's top bar (in the backend editor, the same plus button above the page layout). The elements have a tab of their own, Events Manager, next to Content, Social, Structure and the others.
The Events Manager tab in the Add Element panel.
Each element is saved in the page as a shortcode that starts with em_wpb_: em_wpb_events, em_wpb_calendar, em_wpb_locations and em_wpb_bookings_cart. They are separate from Events Manager's own shortcodes, and you never need to type them. If you deactivate WPBakery, a page keeps these shortcodes and shows them as plain text until WPBakery is active again.
Add an element in the frontend editor
The frontend editor shows the page as visitors see it, with your real events in it, and is the quickest way to try settings.
-
Open the page and click Frontend Editor, above the page content on the page edit screen.
-
Click the plus button in the top bar, open the Events Manager tab and click an element. It appears on the page and its settings window opens on the right.
-
Change the settings. The tabs are Content and Formatting, then WPBakery's own Design Options.
-
Click Save changes. The element redraws in the page with your settings. The Save changes button shows Saved! once it has.
An Events List titled Coming up, showing four events.
-
Click Close when you have finished with the element, then Update in the top bar to save the page.
To change an element that is already on the page, point at it and click the pencil in its control bar, which carries the element's name (Events List, for example).
The settings window shows the same fields in either editor. The preview redraws when you click Save changes, not as you type.
The calendar works in the editor
The calendar in the frontend editor is the real calendar. Its arrows move between months, so you can check next month's events before you publish. Close the settings window first if it covers the calendar.
After clicking the next arrow in the editor.
Saving the settings of an element redraws it, and the calendar's arrows keep working after each redraw.
Add an element in the backend editor
The backend editor is WPBakery's layout on the page edit screen, opened with the Classic Mode button above the content. It shows each element as a box with its name and title instead of a preview.
-
Open the page in WordPress and click Classic Mode.
-
Click the plus button above the layout, open the Events Manager tab and click an element. Its settings window opens.
-
Change the settings and click Save changes.
The backend editor shows each element as a box. Use the pencil to change its settings.
-
Click Update to save the page.
Point at an element's box and click the pencil to open its settings again. They are the same fields as in the frontend editor, and values saved in one editor appear in the other. Use Frontend Editor to see the result.
Events List
A compact list of events: a date badge, the event name as a link, the date and the town.
Settings on the Content tab:
| Setting | Default | What it does |
|---|---|---|
| Title | empty | A heading above the list. Left empty, the element prints Events. |
| Number of events | 5 | How many events to show, from 1 to 100. |
| Scope | Future events | Which dates to include, such as Future events, Today's events, Events this month or Events within 3 months. |
| Archetype | Default | Appears only when your site has custom event types. Chooses which type the list shows. |
| Order By | start date, start time, event name | The fields the list is sorted by. |
| Order | Ascending | Ascending or Descending. |
| Category IDs | empty | Limits the list to one or more categories: an ID, a name or a slug, or several separated by commas, such as 3, Concerts or 3,5. 0 or empty shows every category. See Category IDs. |
| Show all events link | off | Adds a link to your events page under the list. |
| All events link text | all events | The text of that link. This field appears only while Show all events link is ticked. |
Settings on the Formatting tab:
| Setting | What it does |
|---|---|
| No events message | Shown when no events match. Left empty, the element prints No events. |
| List header format | HTML printed once, before the events. |
| List item format | HTML printed for each event, with placeholders. Leave it empty to keep the built-in layout. |
| List footer format | HTML printed once, after the events. |
Settings on the Design Options tab, which every Events Manager element has:
| Setting | What it does |
|---|---|
| Extra class name | Adds a CSS class to the element's wrapper, for your own styles. |
| CSS box | WPBakery's margin, border, padding and background controls for the element. |
A format example
To show each event on one line, with its name as a link and its date, open the Formatting tab and fill in the three format boxes:
| Box | Value |
|---|---|
| List header format | <ul class="whats-on"> |
| List item format | <li>#_EVENTLINK, #_EVENTDATES</li> |
| List footer format | </ul> |
With these formats the list becomes a plain bulleted list of names and dates.
The header and footer are printed once around all the items, so a wrapper opened in the header (<ul>) is closed by the footer (</ul>). They are left exactly as you type them. The item format is different: it is printed once per event, and any tag it opens and doesn't close is closed at the end of each item, so one unfinished item can't swallow the rest of the page. The same applies to the no events message.
Every format and text setting is filtered the way WordPress filters post content, so <script> tags and attributes such as onclick are removed, whoever edits the page.
WPBakery stores the format boxes in a coded form, so in the page's text or shortcode view they look like a long string of letters and numbers. That is expected. Edit them in the settings window.
Category IDs
Category IDs accepts a category's ID number, its name or its slug, or several separated by commas, the same as the Events List block. 0 or an empty field shows every category. Each one has to match a category exactly.
With Concerts typed in, the list shows only concerts.
A name that doesn't match any category, such as Concert instead of Concerts, matches no events, and the list shows its no events message.
A misspelled category name matches nothing.
To check a category's name, slug and ID, go to Events then Event Categories.
The ID column is on the right. Concerts is 3.
Events Calendar
A month calendar with arrows to move between months. Days with events are marked, and clicking an event or a date shows what's on. How calendars behave is explained in Using event calendars.
A large calendar with pills shows a pill for each event, with its start time.
Settings on the Content tab (the calendar has no Formatting tab):
| Setting | Default | What it does |
|---|---|---|
| Title | empty | A heading above the calendar. Left empty, the element prints Calendar. |
| Events shown | All events | All events, or Future events only to leave out past events. |
| Show Long Events? | off | When ticked, an event that lasts several days is marked on every day it covers. When off, only on its first day. |
| Calendar Size | your site's default | Responsive changes size to fit the space. Large, Medium and Small fix it. See calendar sizes. |
| Event Style | your site's default | How events are marked on a day: Pills, Single dot, Multiple dots or Rings. See event styles. |
| Events per day | your site's default (3) | The most events shown on one day, from 0 to 50. 0 means no limit. |
| Category IDs | empty | Limits the calendar to one or more categories, the same way as the Events List. |
| Archetype | Default | Appears only when your site has custom event types. |
The site defaults come from Events then Settings then Formatting then Calendar. The Design Options tab is the same as for the Events List.
Event Locations
A compact list of locations, with the name as a link and the address. This element is offered only while Enable locations? is Yes in Events then Settings then General then General Options.
Event Locations ordered by name.
Settings on the Content tab:
| Setting | Default | What it does |
|---|---|---|
| Title | empty | A heading above the list. Left empty, the element prints Event Locations. |
| Show how many locations? | 5 | How many locations to show, from 1 to 100. |
| Scope of the locations? | Future events | The same choices as the Events List Scope. |
| Order By | Event start date/time, location name | Sort by when each location's events take place, or by Location name. |
| Order | Ascending | Ascending or Descending. |
The Formatting tab has No locations message (left empty, the element prints No locations) and the same three format boxes as the Events List. The item format takes location placeholders, such as #_LOCATIONLINK and #_LOCATIONTOWN.
Event Bookings Cart
ProRequires Events Manager Pro with Multiple Bookings Mode switched on. Without it, the element is not offered.
The events a visitor has added to their cart so far, with the spaces and price of each, a total, and links to the cart and checkout pages. A visitor with nothing in the cart sees the no bookings text.
In the editor, the cart shows what you have booked yourself, which is usually nothing.
Settings on the Content tab:
| Setting | Default | What it does |
|---|---|---|
| Title | empty | A heading above the cart. Left empty, the element prints Event Bookings Cart. |
| Loading text | Loading... | Shown while the cart is fetched. |
| Checkout link text | Checkout | The link to your checkout page. |
| Cart link text | View Cart | The link to your cart page. |
| No bookings text | No events booked yet | Shown when the cart is empty. |
The Formatting tab has List item format, printed for each booked event. Left empty, it shows the event as a link with its dates, and the spaces and price under it. It takes event placeholders and booking placeholders such as #_BOOKINGSPACES and #_BOOKINGPRICE.
The cart on the published page after a visitor books a concert.
On the published page
Visitors see the same output as the editor. The list and locations link to their pages, the calendar's arrows change month without reloading the page, and the cart updates when a visitor books.
The Events List with its built-in layout.
The Events Calendar on the published page.
The elements are not cached by Events Manager or stored as saved HTML in the page, so each visitor sees current events and their own cart. Events Manager's styles and scripts load on any page that uses one of the elements, even when you have limited them to certain pages in the Events Manager settings.
What the elements can't do
The elements offer the same choices as the blocks. For anything else, such as filtering by tag or location, a search form, grid or map views, or pagination, add WPBakery's Raw HTML or Text block element and use an Events Manager shortcode.
Troubleshooting
The Events Manager tab is not in Add Element
Check that WPBakery Page Builder is active and that your Events Manager version includes the WPBakery elements. WPBakery has to be enabled for the post type you are editing, under Post types in WPBakery Page Builder then General Settings.
Event Locations or Event Bookings Cart is missing
Event Locations needs Enable locations? set to Yes in Events then Settings then General then General Options. Event Bookings Cart needs Events Manager Pro with Multiple Bookings Mode switched on.
The page shows text starting with [em_wpb_
WPBakery is not active on the page, or WPBakery is switched off for that post type. Activate it, and the shortcode becomes the element again.
The list says No events
The element shows published events that match all of its settings. Check Scope, which is future events by default, and Category IDs: a name, slug or ID that doesn't match a category exactly matches nothing. See Category IDs.
List items appear outside the list, or the layout breaks after the element
Check that whatever the List header format opens, the List footer format closes, such as <ul> and </ul>. The item format should hold one complete item, such as <li>...</li>.
The preview didn't change after I edited a setting
In the frontend editor, the element redraws when you click Save changes, not while you type. In the backend editor there is no preview; open Frontend Editor to see it.
Changes don't show on the published page
Click Update in WPBakery, then reload the page. If it still shows the old version, clear your page caching plugin or host cache: Events Manager doesn't cache these elements.