The use of formats and placeholders in Events Manager makes formatting the look of your events very easy even for users with limited HTML knowledge.
When events are output by Events Manager, it will also check for tags of {this}...{/this}
format within a page that accepts placeholders, which is just like HTML elements but with curly braces.
Each conditional placeholder will evaluate to true
or false
, if true
the content within the conditional placeholder, such as ...
in the example above, will be shown, otherwise it is hidden.
For example, you can decide to show a default image if the event doesn't have a set featured image like so:
{has_image}#_EVENTIMAGE{/has_image}
{no_image}<img src="/path/to/image.png" alt="#_EVENTNAME - Default Image">{/no_image}
If there are any conditional placeholders you feel are missing, feel free to suggest them! We'll be regularly expanding this list, so if it's useful to others we'll probably add it at some point. You are also able to create your own conditional tags very easily with a little PHP knowledge and our conditional placeholder tutorial.
Events
These placeholders can be used anywhere normal event placeholders can be used. Content will only be displayed if the condition is met, otherwise the whole placeholder will be omitted.
You can also use specific Tag, Category and Location conditional placeholders, in cases of tags and categories, the first category/tag will be used for testing conditions.
General
Placeholder | Description |
---|
has_att_X | Event has a specific custom field named X . Spaces should be replaced with _ underscores, for example {has_att_More_Information} for More Information . |
no_att_X | Event does not have a specific custom field named X . See has_att_X for X info. |
has_image | Event has a featured image. |
no_image | Event does not have a featured image. |
is_active | Event has a status of is active. |
is_cancelled | Event has a status of is cancelled. |
is_private | Event is marked as private. |
not_private | Event is not marked as private. |
is_recurrence | Event is part of a recurring set. |
not_recurrence | Event is not part of a recurring set, meaning it is a single, normal event. |
Event Times
Placeholder | Description |
---|
all_day | Event is an all-day event (regardless of start/end times). |
different_timezone | Event's timezone is different from the blog timezone. |
same_timezone | Event's timezone is the same as the blog timezone. |
has_time | Event is not an all-day event and does not have the same start/end times. |
no_time | Event is not an all-day event and does have the same start/end times. |
is_current | Event is currently happening (according to the timezone of your WordPress site). |
is_future | Event is in the future. |
is_long | Event lasts longer than one day (i.e., ends on different dates). |
not_long | Event does not last longer than one day (i.e., same day events). |
is_past | Event is in the past. |
not_all_day | Event is not an all-day event. |
Bookings
Placeholder | Description |
---|
bookings_closed | Event has bookings enabled and spaces are not available for the current user viewing the page. |
bookings_open | Event has bookings enabled and spaces are available for the current user viewing the page. |
fully_booked | Event has bookings enabled and spaces are not available. This does not take into account whether the user currently viewing the event can book any of those spaces (for example, there are member only tickets and a guest is viewing). |
has_bookings | Event has bookings enabled (regardless of space availability). |
no_bookings | Event does not have bookings enabled (will not show for events with bookings enabled but not available for booking, e.g. if fully booked or bookings are closed). |
has_spaces | Event has bookings enabled and spaces are available. This does not take into account whether the user currently viewing the event can book any of those spaces (for example, there are member only tickets and a guest is viewing). |
is_free | Event is free, meaning there is no ticket with a price greater than 0. |
is_free_now | Event is free at the time of viewing, meaning there is no available ticket with a price greater than 0 at that specific time. |
is_user_attendee | Logged in user has a booking for the event. The booking can be of any status, if you'd like to restrict content to users with a booking of a specific status, you can add the status to the conditional placeholder with the status number (for example, pending is 0, confirmed is 1) like so: {is_user_attendee_1}content{is_user_attendee_1} . |
not_free | Event is not free, meaning there is a ticket with a price greater than 0. |
not_free_now | Event is not free at the time of viewing, meaning there is an available ticket with a price greater than 0 at that specific time. |
not_user_attendee | Logged in user does not have a booking for the event. The booking can be of any status, if you'd like to restrict content to users with a booking of a specific status, you can add the status to the conditional placeholder with the status number (for example, pending is 0, confirmed is 1) like so: {is_user_attendee_1}content{is_user_attendee_1} . |
RSVP Policies Pro
Placeholder | Description |
---|
has_rsvp_reply | Booking has an RSVP reply. |
no_rsvp_reply | Booking does not have an RSVP reply. |
is_rsvp_reply_X | Booking RSVP reply is a specific value (e.g., is_rsvp_reply_0 for "No", is_rsvp_reply_1 for "Yes"). |
is_rsvp_reply_maybe | Booking RSVP reply is "Maybe". |
is_rsvp_reply_no | Booking RSVP reply is "No". |
is_rsvp_reply_yes | Booking RSVP reply is "Yes". |
Waitlist Pro
Placeholder | Description |
---|
has_waitlist | Event has a waitlist enabled. |
no_waitlist | Event does not have a waitlist enabled. |
has_waitlist_booking_limit | Event allows booking a limited number of spaces on the waitlist. |
no_waitlist_booking_limit | Event does not limit the number of spaces to book per booking on the waitlist. |
has_waitlist_expiry | Event waitlist bookings have an expiry time. |
no_waitlist_expiry | Event waitlist bookings do not have an expiry time. |
has_waitlist_limit | Event has a limited number of spaces for the waitlist. |
no_waitlist_limit | Event does not have a limited number of spaces for the waitlist. |
waitlist_closed | Event waitlist is closed to reservations. |
waitlist_full | Event waitlist is enabled and full. |
waitlist_open | Event waitlist is open for reservations. |
Categories and Tags
Placeholder | Description |
---|
has_category | Event has one or more categories. |
no_category | Event does not have one or more categories. |
has_category_X | Event has a category with a term name, id or slug of value 'X'. Replace X with whatever category you are searching for. You can also add multiple categories, separated by commas like so, has_category_X,Y,Z...{/has_category_X,Y,Z} . |
no_category_X | Event does not have a category with a term name, id or slug of value 'X'. Replace X with whatever category you are searching for. You can also add multiple categories, separated by commas like so: no_category_X,Y,Z...{no_category_X,Y,Z} . |
has_tag_X | Event has a tag with a term name, id or slug of value 'X'. Replace X with whatever tag you are searching for. You can also add multiple tags, separated by commas like so: has_tag_X,Y,Z...{has_tag_X,Y,Z} . |
no_tag_X | Event does not have a tag with a term name, id or slug of value 'X'. Replace X with whatever tag you are searching for. You can also add multiple tags, separated by commas like so: no_tag_X,Y,Z...{no_tag_X,Y,Z} . |
has_taxonomy | Event has at least one tag or category associated. |
no_taxonomy | Event does not have at least one tag or category associated. |
Locations
Placeholder | Description |
---|
has_event_location | Event has a valid event (non-physical) location. |
no_event_location | Event does not have a valid event (non-physical) location. |
has_location | Event has a location. |
no_location | Event does not have a location. |
has_location_venue | Event has a valid physical location. |
no_location_venue | Event does not have a valid physical location. |
Placeholder | Description |
---|
has_tag_image | tag has an image associated with it. |
no_tag_image | tag does not have an image associated with it. |
Categories
Placeholder | Description |
---|
has_category_image | category has an image associated with it. |
no_category_image | category does not have an image associated with it. |
Bookings
You can use Event and all related conditional placeholders with regards to a booking, this will refer to the event booked.
RSVP
Placeholder | Description |
---|
has_rsvp_reply | Booking has an RSVP reply. |
no_rsvp_reply | Booking does not have an RSVP reply. |
is_rsvp_reply_X | Booking RSVP reply is a specific value (e.g., is_rsvp_reply_0 for "No", is_rsvp_reply_1 for "Yes"). |
is_rsvp_reply_maybe | Booking RSVP reply is "Maybe". |
is_rsvp_reply_no | Booking RSVP reply is "No". |
is_rsvp_reply_yes | Booking RSVP reply is "Yes". |
Waitlist Pro
Placeholder | Description |
---|
is_waitlist | Booking is on the waitlist or has a booking status of 6, 7, or 8. |
not_waitlist | Booking is not on the waitlist. |
Multiple Bookings Pro
Placeholder | Description |
---|
is_in_multi_booking | Booking is part of a multiple booking. |
not_in_multi_booking | Booking is not part of a multiple booking. |
is_multi_booking | Booking is a multiple booking. |
not_multi_booking | Booking is not a multiple booking. |
Locations
Placeholder | Description |
---|
has_events | Placeholder for locations that have events. |
no_events | Placeholder for locations that do not have events. |
has_loc_image | Placeholder for locations that have an image. |
no_loc_image | Placeholder for locations that do not have an image. |
Imported Events/Locations Pro
Some dynamic data such as prices and spaces booked are accurate from time of import or syncing. These conditionals will still equate
to true
a zero-value is provided, since for example an event may be free and marked as $0
Placeholder | Description |
---|
is_imported | Item was imported by EM I/O. |
not_imported | Item was not imported by EM I/O. |
is_imported_X | Item was imported by a specific format source (replace X with the source such as ical ). |
not_imported_X | Item was not imported by a specific format source (replace X with the source such as ical ). |
imported_is_public | Item was imported and is publicly available at the source. |
imported_is_private | Item was imported and visibility is restricted at the source. |
Event-Specific Imports
Placeholder | Description |
---|
has_bookings_confirmed | Event has booking confirmed spaces defined at import. |
no_bookings_confirmed | Event does not have booking confirmed spaces defined at import. |
has_bookings_price | Event has a booking price defined. |
no_bookings_price | Event does not have a booking price defined at import. |
has_bookings_spaces | Event has booking spaces defined at import. |
no_bookings_spaces | Event does not have booking spaces defined at import. |
has_bookings_url | Event has an external URL for bookings. |
no_bookings_url | Event does not have an external URL for bookings. |
has_event_url | Event has an external event URL. |
no_event_url | Event does not have an external event URL. |
Other
Placeholder | Description |
---|
logged_in | user is logged in. |
not_logged_in | user is not logged in. |
Nesting Conditional Placeholders
It is possible to use conditional placeholders within each other. However, by default Events Manager will only go one level deep, meaning it won't check conditional placeholders within conditional placeholders. This is due to the extra processing required to achieve such behaviour.
In order to enable further levels of nesting, you need to add a line of PHP to your wp-config.php file:
define('EM_CONDITIONAL_RECURSIONS',2);
The example above will go 2
levels down, meaning you could nest conditional placeholders within another conditional placeholder. If you wanted to nest one inside the nested placeholder, then you need to increase that number to 3
.
Nesting Example
Here is an example of nested conditional placeholders, 2
levels deep. It will show certain content for members or guests for events that have a tag called private
:
{has_tag_private}
{logged_in}
Here's some more information ...
{/logged_in}
{not_logged_in}
For more info ... <a href="/login/">log in</a>!
{/not_logged_in}
{/has_tag_private}