Event Alerts
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 both installed 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 setting 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: Enter the number of days before alerts are automatically disabled, or leave it blank to disable this feature. By default, alerts will be turned off for a search after 90 days.
- 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 “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.
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:
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 it. They have the option to create event alerts based on filters. They can choose any filter like event type, 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 also choose the frequency at which they want to receive the email alerts for events.
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 and 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.
Advanced: Controlling/Adjusting alert button and alert form place
- 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 customization template files can be found in the wp-event-manager-alert/templates/ directory.
To override a template file. you need to follow the below-mentioned steps:
- Create directory “wp-event-manager-alert” under your theme folder.
- Copy the template file to “/wp-content/yourtheme/wp-event-manager-alert/” directory.
- Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-alert/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-alert/).
- 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.
Remember: If you have overridden template file and plugin frequently updating then you need to sync template file with new updates from the plugin’s template file for better functionality and new features.