Generic placeholders

There are a number of generic placeholders, which can be used everywhere/always (even outside events/locations, if you’d use the eme_if shortcode standalone on a page). These are:

  • #_IS_USER_IN_GROUP{xxx} returns ‘1’if the logged in WP user is in the EME group called ‘xxx’, ‘0’ otherwise. Multiple groups can be specified, separated by “,”.
  • #_IS_USER_MEMBER_OF{xxx} returns ‘1’if the logged in WP user is an active member of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_IS_USER_MEMBER_PENDING{xxx} returns ‘1’if the logged in WP user is a member with status pending of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_IS_USER_MEMBER_EXPIRED{xxx} returns ‘1’if the logged in WP user is a member with status expired of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_USER_HAS_ROLE{xxx} returns ‘1’if the logged in WP user is has the WP role called ‘xxx’, ‘0’ otherwise. Multiple roles can be specified, separated by “,”.
  • #_USER_HAS_CAP{xxx} returns ‘1’if the logged in WP user is has the WP capability called ‘xxx’, ‘0’ otherwise. Multiple capabilities can be specified, separated by “,”.
  • #_IS_SINGLE_DAY returns ‘1’ if you’re viewing a single day, ‘0’ otherwise
  • #_IS_SINGLE_EVENT returns ‘1’ if you’re viewing a single event details, ‘0’ otherwise
  • #_SINGLE_EVENTPAGE_EVENTID if viewing a single event, it will return the event id, empty otherwise
  • #_IS_SINGLE_LOC returns ‘1’ if you’re viewing a single location details, ‘0’ otherwise
  • #_IS_ADMIN or #_IS_ADMIN_PAGE returns ‘1’ if on the admin pages, ‘0’ otherwise
  • #_IS_RSVP_PASSWORD_ENABLED returns ‘1’ if the event being watched is RSVP password protected, ‘0’ otherwise
  • #_CURDATE returns the current date in YYYY-MM-DD format
  • #_CURDATE{xx} (with “xx” a php dateformat notation) returns the current date in the php dateformat mentioned between brackets. E.g. #_CURDATE{Y} will return just the year.
  • #_CURTIME if you want to compare the current date in HH:MM format
  • #_CURTIME{xx} (with “xx” a php dateformat notation) returns the current time in the php dateformat mentioned between brackets.
  • #_DATE{xx} or #_DATE{xx}{yy} with “xx” being a php date expression (like e.g. “+7 days”) and “yy” being the wanted format (can be left out, then the generic format for dates is used). This allows to create templates to send a mail to persons saying things like “this is valid until 7 days from now”.
  • #_IS_LOGGED_IN returns ‘1’ if user is logged into WP, ‘0’ otherwise
  • #_LOCALE returns the current locale
  • #_LANG returns the current language
  • #_UNSUB_URL returns the unsubscribe url for mailings
  • #_MEMBERSHIP_PAYMENT_URL{xx} (with ‘xx’ being the name or id of a membership), returns the payment url of a member if the person is logged in and a pending, active or expired member of the mentioned membership
  • #_WPID returns the wordpress is of the current logged in user. This can then be used in included eme_events shortcodes (if e.g. you want to filter on contact id based on current logged in user).
  • #_HAS_USER_REGISTERED{xx} (with ‘xx’ being one or more event ids, seperated by comma) returns ‘1’ if the current logged in user is registered for one of the mentioned events,’0′ otherwise
  • #_HAS_USER_TASK_REGISTERED{xx} returns ‘1’ if the current logged in user has registered for the task with id ‘xx’, ‘0’ otherwise
  • #_ALLCATEGORYIDS returns a list (comma-separated) of all category ids defined in EME, so you can loop over those (using eme_for) and for example show events per category
  • #_USER_GROUPS returns a list (comma-separated) of all EME groups a logged in user is in.
  • #_USER_MEMBERSHIPS returns a list (comma-separated) of all EME memberships a logged in user has.

Example usage:
[eme_if tag='#_IS_LOGGED_IN' value='0'] You are NOT logged in [/eme_if]
[eme_if tag='#_IS_LOGGED_IN' value='1'] You are logged in [/eme_if]
[eme_if tag='#ESC_CATEGORIES' contains='red'] The event is in at least the red category [/eme_if]
[eme_if tag="#ESCj #ESCM #ESCY" value="#ESC@j #ESC@M #ESC@Y"] The start and end date of this event is the same, so just showing start: #j #M #Y [/eme_if]
Or, print start date, and print end date only if different : #_STARTDATE [eme_if tag="#ESC_STARTDATE" notvalue="#ESC_ENDDATE"] #_ENDDATE [/eme_if]
A variant of the above, using curly brackets:
[eme_if tag="#ESC_{j M Y}" value="#ESC@_{j M Y}"] The start and end date of this event is the same: #{j M Y} [/eme_if]
Print start date, and print end date only if different:
#_{j M Y} [eme_if tag="#ESC_{j M Y}" notvalue="#ESC@_{j M Y}"] #@_{- j M Y} [/eme_if]
Print the list of attendees if at least one person signed up:
[eme_if tag='#_AVAILABLESEATS' lt='#_TOTALSEATS']<p>The following people have signed up for this event:#_ATTENDEES</p>[/eme_if]

Scroll to Top