The Alert plugin lets the registered users on your site create Event Alerts on a daily, weekly, or fortnightly basis depending on popular searches with keywords, location, or categories.
Installing the Plugin
The installation process is the same for all the addons offered by WP Event Manager. They can be installed both automatically and manually.
Automatic Installation: You can install the plugin from the backend of your WordPress. Click Here to see how you can install the plugin automatically.
Manual Installation: You can also install the plugin manually using SFTP or FTP tools. Click Here to see how you can install the plugin manually.
Watch the entire video for better understanding.
Event Alert Settings
Once you have installed and activated the Event Alert plugin on your WordPress site, you can set your preferences in the Event Alert settings options in the backend.
To access the Event Alert settings, here are the steps you need to take:
Go to: WP-admin >> Events Manager >> Settings
Click on the Event Alert tab. Here you will get the following options:
Alert Email Content: Here you need to type the message that you want to send your audiences in the alert email.
Alert Duration: Here you need to enter the number of days after which alerts will be automatically disabled. You can also leave this option blank to keep alerts active for an indefinite period. Usually, alerts are automatically deactivated after 90 days by default.
Alert Matches: If you enable the “Send alerts with matches only” option, it will send an alert only when events are found matching its criteria. When that option is disabled, an alert is sent regardless of these criteria.
Alerts Page ID: Select the “Event Alert” page from the drop-down where you have placed the [event_alerts] shortcode. This will help the plugin identify the place to link users to view their alerts.
Delete Data on Uninstall: By enabling this option, you allow the plugin to delete all the Alert data once you uninstall the plugin.
Important: After creating alerts, users will be redirected to the events alerts page which they have selected in the Alerts setting section.
Event Alert Form
This feature enables users to set alerts for the events.
If you are logged in, visiting the event detail page (if you have the Event Alert plugin installed) will show you the “Alert me to events like this” button at the sidebar of the event detail page.
Clicking on that button, you will be redirected to the event alert page that will look something like this:
Event alerts can be accessed through the frontend event dashboard as well.
How to Create Event Alerts Based on Filters?
The best part about the Alerts plugin is that your registered users don’t need to receive boring alerts if they’re not interested in them. They have the option to create event alerts based on filters. They can choose any filter like event type or category and only get the alerts for the ones they want to.
If you are logged in, you can save your filtered event as an alert using the ‘Add Alert’ button. Also, they can choose the frequency at which they want to receive the email alerts for events.
After creating alerts, users will be redirected to the events alerts page which they have selected in the Alerts setting section.
How to Get the Event Alert Dashboard?
How will the visitors be able to manage the event alerts and update them?
The plugin provides an event alert management dashboard. From here, you can change the event on which you want to get the email alert. You can also edit, update, or delete the event alert information.
As you can see in the image, there are some splendid options that you can use to do so.
You need to create a page by following the steps:
WP-admin >> Pages >> Add New
Add a suitable title to it like “Event Alert” or “My Event Alert”. Then paste the shortcode.
[event_alerts]
It is recommended for you to insert the shortcode into the “Text” view of the visual editor to ensure it gets formatted correctly.
After creating the new Event Alert page, you also need to select this page from the Alerts Settings page so that the plugin can redirect users to the correct Event Alerts page.
Advanced: Controlling/Adjusting Alert Button and Alert Form Placement
The alert form is hooked into the event page after the event meta place as shown below.
- <?php
- add_action( 'single_event_listing_button_end', array( $this, 'single_alert_link' ) );
- ?>
To remove and move it to a different place, you can do like this:
- <?php
- /**
- * Move my alert message place to the perfect place.
- * Show my alert message after button section that way we have hooked 'single_event_listing_button_end' hook and it will show at after button section.
- *
- * @param array $steps
- * @return array
- * @since 1.0.0
- */
- function move_my_alert_events_message()
- {
- global $event_manager_alerts;
- if ( has_action( 'single_event_listing_meta_after', array( $event_manager_alerts, 'single_alert_link' ) ) )
- {
- remove_action( 'single_event_listing_meta_after', array( $event_manager_alerts, 'single_alert_link' ) );
- }
- if ( has_action( 'single_event_listing_button_end', array( $event_manager_alerts, 'single_alert_link' ) ) )
- {
- remove_action( 'single_event_listing_button_end', array( $event_manager_alerts, 'single_alert_link' ) );
- add_action( 'single_event_listing_button_end', array( $event_manager_alerts, 'single_alert_link' ) );
- }
- else
- {
- add_action( 'single_event_listing_button_end', array( $event_manager_alerts, 'single_alert_link' ) );
- }
- }
- add_action( 'wp', 'move_my_alert_events_message', 12 );
- ?>
In general, you can use your choice of the custom hook to append the form to a different place.
- <?php
- global $event_manager_alerts;
- add_action( 'your_custom_hook', array( $event_manager_alerts, 'single_alert_link' ) );
- ?>
Advanced: Overriding/Customizing the Templates
For overriding or customizing template files, the files can be found in the wp-event-manager-alerts/templates/ directory.
To override a template file, you need to follow the below-mentioned steps:
Create a directory named “wp-event-manager-alerts” under your theme folder.
Copy the template file to the “/wp-content/yourtheme/wp-event-manager-alerts/” directory.
Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-alerts/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-alerts/).
The following template files can be overridden:
my-alerts.php template file lists the user’s alerts.
alert-form.php template file controls the way the alerts form is displayed on the events page.
single-event-alerts-link.php template file manages the way the Alert me like this event button is displayed on the events page.
wpem-alerts-notifier.php file is used to override the email template that is sent to users for their alerts.
Remember: If you have overridden a template file and the plugin is frequently updated, then you need to sync the template file with new updates from the plugin’s template file for better functionality and new features.