How to Add Questions to Event Espresso Question Groups

Today we will take a look at adding questions to question groups in Event Espresso. Lets begin by taking a look at the Registration Form screen for Event Espresso.

Login to your WordPress admin. Then locate Event Espresso in the admin menus and click on Registration Form. Below is a screenshot of part of the screen:

event-espresso-registration-form-screen

The Questions tab is shown by default when you click through to the Registration Form from the WordPress admin menus. A question in Event Espresso can be thought of as the a specific piece of information that you are requesting from an attendee/registrant. If we look at the screenshot above, we see two examples of questions: First Name and Last Name.

A Question Group allows you to bundle or cluster a set of questions together. Event Espresso comes with two default Question Groups:

  • Personal Information
  • Address Information

What kind of information would you expect to see in the personal information question group? For this question group, Event Espresso asks for contact information such as first name, last name, and email. For the address information question group, Event Espresso asks for information that is related to the address of the attendee/registrant such as street address and even phone number. Now that we have a basic understanding of what questions and question groups are, lets take a look at creating a new question group and associating questions with it.

Note: certain questions cannot be deleted as these are system questions. These are the questions that Event Espresso needs to create registrations correctly.
Important: please make sure that a question is only assigned to one question group. This will help avoid having the question duplicated on the registration form and causing validation errors that may stop registrations.

From the Registration Form screen, click on Question Groups. Then click on the button at the top of the page that says Add New Question Group. You’ll then arrive at the Question Group editor and you can begin entering information about your new question group. Go ahead and enter a title or name for your question group. You can enter a group identifier or allow Event Espresso to create one for you (occurs after saving).  The remaining fields are optional. When you are finished editing your question group, click on the save and close button. This will take you to your Questions Groups page.

Now click on the tab for Questions and then click on the button that says Add New Question. You’ll then arrive at the Questions editor and you can begin entering information about your new question. Once you are finished, click on the save and close button. Then repeat these steps for additional questions.

After you have created all of your new questions, we’ll need to link them to your new question group. Return to the Question Groups screen and click on your question group. You’ll now see your question group along with available questions towards the middle right of the screen. In the screenshot below, we have some sample questions that we want to link with our question group called survey:

event-espresso-question-group-example

To link a question to a question group, place a checkmark next to those questions. You can also adjust the order that the questions will appear in by dragging and dropping them. Once you are happy with your changes, be sure to click on save and close. This will return you to your Questions Groups screen.

Your question groups can also be sorted by using drag and drop. Keep in mind that this updated order for these questions and question groups will be used throughout Event Espresso including the WordPress admin and on the front end of your website.

Posted in | Comments Off on How to Add Questions to Event Espresso Question Groups

How to Setup No-Cache/Exclusion Rules for Event Espresso

Caching plugins have become a popular way to increase the load speed of WordPress sites. While they work well for static content such as pages and blog posts, they can interfere with registrations in Event Espresso. The content from Event Espresso changes with each ticket you sell and the event information needs to be updated and correct for the next person registering. In this article, we’ll learn how to create exclusion rules or no-cache rules for Event Espresso content.

We will first need to locate the pages that we want to add to the no-cache list.

Begin by logging into your WordPress admin. Then locate Event Espresso in the admin menus and click on General Settings. Once on this page, click on Critical Pages tab. The Critical Pages are pages that Event Espresso needs to run correctly and they will all need to be added to the no-cache list.

All pages shown should have Page Status OK and Shortcode OK as shown in the screenshot below:

event-espresso-critical-pages-status-ok-shortcode-ok

The next step is to get the slugs of each of these pages. This can be done by right clicking on each view link and opening each link in a new tab. This will load each page in your web browser so you can view the URLs. The slug is the end of the URL (part after your web domain — see examples below). On a default install of Event Espresso 4, the slugs will be:

/events/
/registration-checkout/
/transactions/
/thank-you/
/registration-cancelled/

Make note of your slugs — especially if you have customized them on your site.

On a default install of Event Espresso 3, the slugs will be:

/event-registration/
/thank-you/
/transactions/
/registration-cancelled/

Make note of your slugs — especially if you have customized them on your site.

Now to go the settings for your caching plugin and clear the cache once. Then locate the area to enter the no-cache/exclusion rules. This varies from caching plugin to caching plugin so we have listed steps for some of the popular caching plugins.

Setup no-cache/exclusion rules for Quick Cache

Login to your WordPress admin. Then locate Quick Cache in the WordPress admin menus and click on it. Scroll down the page and find the area for URI Exclusion Patterns. Add your slugs for your critical pages in Event Espresso and save changes. Then clear the cache (if your plugin doesn’t on its own).

Note: URI Exclusion Patterns is currently an option in the pro version of Quick Cache.

Setup no-cache/exclusion rules for SuperCacher

SuperCacher is a caching solution from SiteGround. Login to your WordPress admin. Then locate SuperCacher in the WordPress admin menus and click on it. One the next page and find the area for Exclude URLs From Dynamic Caching. Add your slugs for your critical pages in Event Espresso and save changes by clicking on the Update the Exclude List button:

event-espresso-no-cache-rules-supercacher

Then clear the cache by clicking on the Purge SG Cache link which appears on the admin toolbar in your WordPress Dashboard.

Setup no-cache/exclusion rules for W3 Total Cache

Login to your WordPress admin. Then locate Performance in the WordPress admin menus and click on Page Cache. Scroll down the page and find the area for Never cache the following pages:

w3-total-cache-event-espresso-critical-pages

Add your slugs for your critical pages in Event Espresso and save changes. Then clear the cache (if your plugin doesn’t on its own).

You will also need to disable Object Caching and Database Caching in the W3TC settings.

Setup no-cache/exclusion rules for WP Super Cache

Login to your WordPress admin. Then locate Settings in the WordPress admin menus and click on WP Super Cache. Click on the Advanced tab and scroll down the page and find the area for Add strings here (not a filename) that forces a page not to be cached:

wp-super-cache-event-espresso-critical-pages

Add your slugs for your critical pages in Event Espresso and save changes. Then clear the cache (if your plugin doesn’t on its own).

Setup no-cache/exclusion rules for WP Rocket

Login to your WordPress admin. Then locate Settings in the WordPress admin menus and click on WP Rocket. Click on the Advanced Settings tab and scroll down the page and find the area for Never cache the following pages:

wp-rocket-event-espresso-critical-pages

Add your slugs for your critical pages in Event Espresso and save changes. Then clear the cache.

Setup no-cache/exclusion rules for server level caching

Some managed WordPress hosts such as WP Engine have an internal caching system. You’ll need to reach out to your web host directly to request that no-cache rules be setup for your critical pages in Event Espresso.

Godaddy Managed WordPress Hosting

Sadly, Godaddy Managed WordPress hosting does not have a way to exclude specific pages from being served by a cache. Here is a solution that is recommended by Mendel from Godaddy:

  1. Login to your WP dashboard and click on Flush Cache which appears on the admin toolbar: http://cl.ly/image/2228341I1P18
  2. Then you sFTP into the server and rename or delete the object-cache.php file found in the wp-content folder. If you are unable to accomplish this task yourself, then please check with with the WordPress Managed hosting support team at Godaddy and ask them to delete the object-cache.php file from the /wp-content/ directory of your website

Additional Notes

Instructions on how to disable caching for Godaddy Managed Hosting:
https://eventespresso.com/topic/incompatible-with-godaddy-managed-wordpress-hosting/

From time to time, some caching files become damaged and will not clear even after clicking to clear the cache. If this happens, you can manually clear the cache by logging into your WordPress root with an SFTP or FTP client such as FileZilla or CyberDuck. Then browse to wp-content folder and remove any cache-related files (e.g. cache_ and advanced_cache). Then return to your WordPress admin and clear the cache one more time.

Posted in | Comments Off on How to Setup No-Cache/Exclusion Rules for Event Espresso

Messages System: Message Templates

Message_template_editorMessage Templates are the blueprint for what the message will look like when its assembled. This is a very powerful component to the messages system because it allows for more granular control of the “looks” of outgoing messages.

The important thing to remember about message templates, is that there is a message template for each messenger, message type, and context combination. So for example, there is a template for the email messenger, registration approved message type, and Event Admin recipient (context).

Each message template will have fields that are defined by the messenger primarily but also supplemented by the message type if there are any additional fields required by the message type. For instance, all email templates will have to, from, subject and main content fields.

Note
You will see other fields like [event_list], [attendee_list] etc in the message templates. These are special fields related to messages shortcodes.

When you activate Event Espresso, the message system comes with default global templates out of the box that will help you get started right away with your events without having to do any editing. However you are able to edit any of these templates.

Difference between Global and Event specific templates
One more powerful feature with the new messages system is that by default, global templates will apply to every trigger happening with an event. So that means, for example, when a registration is approved (the trigger), all the global templates using the Registration Approved message type get sent. However, the messages system also allows Event Authors to create a custom template for that message type to be used only for that event. If this is done, then when the Registration Approved message type is triggered the message template for that event is used instead of the global message template. This allows you to differentiate different automatic messages for different events.

Customizations

Our support team cannot write custom coding for you. Below are some examples on customizing this feature.
  • Enqueue your own styles or scripts via this hook (and just add the regular wp_enqueue_style() etc in your function):
    AHEE__EE_Html_messenger__enqueue_scripts_styles
    That should load any CSS scripts/styles AFTER the messages styles/scripts.
  • Learn about Registering a Messages Template Variation

 

Posted in | Comments Off on Messages System: Message Templates

Messages System: Contexts

A context describes who or what receives the message. You won’t see the word context much in the UI for messages because the labels for contexts are dynamic and are defined by message types (but can also be overridden by messengers). When defined by the system, they will take on a label that more accurately describes the intent. For instance with all the current message types in the system there are up to three contexts available (which are labelled recipients in the UI): event admin, primary registrant, and registrant. The purpose of the context is to empower you to be more granular in the messages you send out.

As an example, for the Registration Approved message type, the event admin may receive summary details of the registration that was approved, whereas the primary registrant will receive information pertaining to the whole group registered, and the registrant just receives details on their specific registration for the event.[1]

Keep in mind that the number of contexts available per message type and messenger combination is variable depending on how they’ve been designed by us (or the third-party plugin for the messages system). For instance, we didn’t include the registrant context with any of the payment message types because its really only the primary registrant (the one who completed the registration) who is concerned with paying for the tickets.

When editing message templates, it is important to keep these contexts in mind, see Message System: Working with message contexts


  1. Note, we may eventually add registrant contexts for payment message types if it becomes possible for registrants in a group registration to pay for their own registration. ?

Posted in | Comments Off on Messages System: Contexts

Messages System: Messengers

Messengers are part of the Event Espresso Messages system. Messengers describe the vehicle or method that delivers the messages. The most common delivery vehicle pretty much all of us are familiar with is email. As of this writing, email is the first and currently only messenger used by the messages system. Which is why we intentionally built the messages system so it would act more like a framework for being able to rapidly add different kinds of messengers and message types for Event Espresso.

Currently there are 3 types of messengers: Email, HTML, and PDF. The Email messenger delivers email, and the HTML messenger generates the HTML Receipts, Invoices, and Tickets (available with the Ticketing add-on).

How to activate and deactivate a Messenger

To activate/deactivate a Messenger, navigate to Event Espresso > Messages > Settings and click on the control. When the control is green, that means the messenger is activated. When the control is grey, that means the messenger is deactivated.

Turning the control on/off (green/gray) will deactivate all the message templates for that Messenger. In this example, the message types that are in the Email Settings panel will all be activated or deactivated depending on the status of the Messenger control.

You can control whether individual messages are active/inactive by either: 1) editing the message and turning the control on/off, 2) dragging and dropping the message type from the Active to the Inactive Message Types panel as shown above (for example, the Ticket Notice message type is set to be inactive), and 3) removing the recipient from the TO line in the message template.

Posted in | Comments Off on Messages System: Messengers

Messages System: Message Types

messagetype_messenger_contextMessage Types describe the kind of message that is being sent and describe what the content of the message. There are Message types for payment related messages (payment received, payment reminder, payment declined, refund issued). There are Message types for five registration related messages (registration approved, not approved registration, registration pending, registration declined, registration cancelled, newsletter). Message types are attached to triggers[1]


  1. Triggers simply refer to the places where a message might be “triggered” to be sent. Examples are: when a payment is made, when a registration is approved, when a registration is cancelled. Notice the word when, that is indicative that triggers are very much event based. ?

You can control whether individual Message Types are active/inactive by either: 1) editing the message and toggling the control on/off, 2) dragging and dropping the message type from the Active to the Inactive Message Types panel in the Messages Settings tab, and 3) removing the recipient from the TO line in the message template.

If you see a Message Type, with a Messenger recipient grayed out, then the message is turned off for that recipient (e.g. the Event Admin, Primary Registrant, or Registrant).

Posted in | Comments Off on Messages System: Message Types

Messages System: Shortcodes

Message_shortcodesMessage shortcodes are special snippets of text that allow for precisely controlling how dynamic content will display in the message template. If you are familiar with how WordPress shortcodes work then using these shortcodes should be fairly straightforward. Shortcodes such as [EVENT_NAME], [REGISTRANT_FNAME], [EVENT_AUTHOR_FORMATTED_EMAIL] all provide an easy way to indicate where dynamic content will be inserted when messages are sent.

There are also special shortcodes that we call list-type shortcodes. These are shortcodes such as [ATTENDEE_LIST], [EVENT_LIST], and [QUESTION_LIST][1]. These shortcodes are special because when you use it, you are indicating that this is where you want a list of items to be displayed in your template. When the message generator[2] gets to this shortcode, it will signal it to look for a corresponding field in the template to know how to parse each item in the list. So when you see a field in a message template that is labelled with [event_list] then you know that when the [EVENT_LIST] shortcode is parsed, the generator will look in the
[event_list] field to know how to parse each event item.

Display Answers to Questions in Your Templates

To display all answers:
You add the
[QUESTION_LIST] shortcode to the [ATTENDEE_LIST] section, then within the
[QUESTION_LIST] section you can add the [QUESTION] and [ANSWER] shortcodes.

To display individual answers:
Add the
[RECIPIENT_ANSWER_*] shortcode in a valid location, and use the question display text you are testing. In my case the question was “What color?” so when I added the shortcode it was

[RECIPIENT_ANSWER_* What color?] I also prefaced the shortcode with the actual question text so I could tell that I was seeing the right message when I received it.

Note: It is VERY important that your question display text match exactly what the question is.


  1. This shortcode is only found with Event Espresso 4 Regular (not decaf version). ?
  2. This is slang for the code that handles putting messages together using the templates and the data from the trigger point. ?

Posted in | Comments Off on Messages System: Shortcodes

EE4 Custom Post Types

Any requests to get_posts of type ‘espresso_events’ or ‘espresso_venues’ automatically have an attached EE_Event or EE_Venue object, which contains extra info (like extra Event metadata, or Venue location data), and also has functions for easily getting related data.

For example, the EE_Event object has functions like is_active() (determines if the event is considered “Active” or not, taking into account the event’s status, whether all the datetimes for the event have passed, and other factors), tickets() (which retrieves all the non-archived tickets for that event), datetimes_ordered() (which retrieves all the datetimes for the event, ordered by time), etc. (See core/db_classes/EE_Event.class.php).

“Event CPT” data includes normal post data including:

  • Title
  • Description
  • Tags
  • Categories
  • Featured Image
  • Commenting
  • Excerpt
  • Custom Fields
  • Slug
  • Author
This data can be queried and displayed in themes along with other post data.

Taxonomies for events and venues

The espresso_event_categories custom taxonomy is registered for events.
The espresso_venue_categories custom taxonomy is registered for venues.
The post_tag taxonomy is also available to be used with Event Espresso events and venues.

How to change the “events” CPT slug

You can change the events slug by setting the Event Slug option in Event Espresso > Events > Templates. The slug option cannot be set to be event, which is the singular slug of the event custom post type.

How to change the “venues” CPT slug

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

How to change the template for the single event post

The WordPress template hierarchy will look for a single-espresso_events.php template before falling back to single.php, then singular.php, then finally to index.php.

You can set up a custom template design for the single event view by following these 3 steps:
1) Make a copy of the theme’s page.php or the single.php template and put the copy into the active WordPress child theme.
2) Rename the copy to be single-espresso_events.php.
3) Important: You will also need to add this line of code to your theme’s functions.php file:

add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

How to change the template for the event list archive

The WordPress template hierarchy will look for a archive-espresso_events.php template before falling back to archive.php, then finally to index.php.
You can set up a custom template design for the event list archive by following these 3 steps:
1) Make a copy of the theme’s archive.php or the index.php template and put the copy into the active WordPress child theme.
2) Rename the copy to be archive-espresso_events.php.
3) Important: You will also need to add this line of code to your theme’s functions.php file:

add_filter( 'FHEE__EED_Event_Archive__template_include__allow_custom_selected_template', '__return_true' );

Please be sure to set up a child theme before you begin to make theme modifications. When you keep your modifications within the child theme, your changes will not be overwritten should the theme need to be updated in the future.

How to change the Archive titles for EE custom post type archives

If your WordPress theme uses the_archive_title() to display the archive title, you can change the post type archive titles by adding the following code to the theme’s functions.php file or add to a site specific functions plugin:

Posted in | Comments Off on EE4 Custom Post Types

EE4 Theme Templates and Tags

Wondering how to customize templates in Event Espresso 4? Well, let’s put on our developer hats and get started!

Before we get started. Please note that since Event Espresso 4 is based on WordPress core coding standards, you need to understand that there may be some significant code changes involved to create fancy designs and/or template customizations. You will need a firm background in HTML, PHP, and WordPress before trying to make customizations to any part of your website.

If you don’t feel like getting your hands dirty. We offer a very small set of customization options, such as removing or adding filters, moving files, creating database backups, etc., with purchase of support token(s). The support token does NOT allow for customization of the resultant templates, but it does provide a base for you to do further customizations. However, your theme must support child theming. If it does not support child theming, then the support token will cover creating the custom templates for your  theme, but YOU will be responsible for ensuring they do not get overwritten on the theme updates. That being said, it might be time to start searching for a new theme or take great CARE when updating.

Each EE4 CPT has a corresponding view helper file in the /core/helpers/ folder that should get automatically loaded anytime one of our CPTs is part of the incoming request (i.e. if the current WP_Query object has one of our CPTs in the list of post_types for that request). The only two view helpers currently are:

  • EEH_Event_View.helper.php
  • EEH_Venue_View.helper.php


Each file contains a series of WP Template Tags (functions that can be used to add content) that can be used in the templates. You can copy your existing theme’s archive.php template and name it archive-espresso_events.php. Then you can use any of the template tags from the list below.

Here’s a list of each helper’s related template tags:

Event template tags

  • espresso_event_reg_button()
    (returns the “Register Now” button if event is active, an inactive button like status banner if the event is not active or a “Read More” button if so desired)
  • espresso_event_status_banner()
    (returns a banner showing the event status if it is sold out, expired, or inactive)
  • espresso_event_status()
    (returns the event status if it is sold out, expired, or inactive)
  • espresso_event_categories()
    (returns the terms associated with an event)
  • espresso_event_tickets_available()
    (returns the ticket types available for purchase for an event)
  • espresso_event_date_obj()
    (returns the primary date object for an event)
  • espresso_event_date()
    (returns the primary date for an event)
  • espresso_list_of_event_dates()
    (returns a unordered list of dates for an event)
  • espresso_event_end_date()
    (returns the last date for an event)
  • espresso_event_date_range()
    (returns the first and last dates for an event (if different))
  • espresso_event_date_as_calendar_page()
    (returns the primary date for an event, stylized to appear as the page of a calendar)
  • espresso_event_link_url()
    (the link to the event’s single page)
  • espresso_event_phone()
    (the event’s phone #)
  • espresso_edit_event_link()
    (returns a link to edit an event)

These tags are for displaying the Your Organization Settings info:

  • espresso_organization_name()
  • espresso_organization_address()
  • espresso_organization_email()
  • espresso_organization_logo_url()
  • espresso_organization_facebook()
  • espresso_organization_twitter()
  • espresso_organization_linkedin()
  • espresso_organization_pinterest()
  • espresso_organization_google()
  • espresso_organization_instagram()

EEH_Venue_View

  • espresso_event_venues()
    (returns all venues related to an event)
  • espresso_venue_name()
  • espresso_venue_link()
  • espresso_venue_description()
  • espresso_venue_excerpt()
  • espresso_venue_categories()
    (returns the terms associated with a venue)
  • espresso_venue_address()
    (returns a formatted block of html for displaying a venue’s address)
  • espresso_venue_has_address()
    (returns TRUE or FALSE if a Venue has address information)
  • espresso_venue_gmap()
    (returns a google map for the venue address)
  • espresso_venue_phone()
  • espresso_venue_website()
  • espresso_edit_venue_link()

Posted in | Comments Off on EE4 Theme Templates and Tags

Registration Status in EE4

Event Espresso 4.0 and beyond has streamlined the payment status for attendees, but has also separated Payment Statuses and Registration Statuses.

There are now 5 registration statuses available:

Approved

The attendee has been approved for the event, and the capacity for the event is reduced accordingly. This will automatically be set if the attendee has completed payment, or has registered for a free event.

It is possible to set a registration’s status to Approved before receiving payment.

Pending Payment

The attendee has registered for an event but has not completed payment yet. The attendee is allowed to make a payment to complete the registration. The attendee will not count towards any capacity maximum for the event. Free events will not allow Registrations to be marked as Pending.

Not Approved

The registration has processed but payment cannot be made until approval. If the admin wants to allow the attendee to complete the registration, the attendee’s status must be changed to Pending. The attendee will not count towards the event capacity.

Declined

The admin can set an attendee to declined. Available event capacity will not be reduced, and the attendee cannot pay for the ticket.

Cancelled

The attendee will be marked as cancelled if the admin marks them as cancelled. Available event capacity will not be reduced, and the attendee cannot pay for the ticket.


The default status for an unpaid attendee is Pending, though this can be changed in the Events > Default Settings tab or within each event individually, under the Event Registration Options box.

Posted in | Comments Off on Registration Status in EE4

Event Espresso