Some industries’ compliance recommendations suggest that a notice be presented anytime someone leaves your site. I searched for a plugin to do this, and came up empty, so here you go!
* Works with little or no configuration.
* The title and the body of the exit box, and the text on the buttons are all editable, and honor shortcodes.
* There are also options for providing a visual indication on your selected links, and for opening selected links in a new window/tab.
* You can completely customize the display of the dialog by modifying the CSS.
* You can set a timeout that will continue or cancel when the time expires, with optional visual feedback.
* Add CSS classes to selected links.
* Add Custom CSS that applies to the whole site.
* You can add custom tags in the anchor tag for each link to provide custom title and body for each link.
* Compatible with simple forms in some cases. Should work well with WooCommerce External/Affiliate product pages.
* Will honor <a target=”whatever”> for selectively opening in a new tab/window.
* Allows you to add rel=”nofollow” to all outbound links.
* You can now exclude individual links by applying a CSS class.
* Accessibility issues addressed with library updates.
When upgrading, please be sure to clear the cache if you’re using a caching plugin like the excellent WP Fastest Cache (http://www.wpfastestcache.com/) or something similar. There have been substantial changes and having older versions of the files cached will almost certainly lead to problems when an external link is clicked.
Credit where credit is due
I have made liberal use of the excellent WordPress Plugin Template by Hugh Lashbrooke found at https://github.com/hlashbrooke/WordPress-Plugin-Template. Thanks, Hugh!
Installing “Exit Notifier” can be done either by searching for “Exit Notifier” via the “Plugins > Add New” screen in your WordPress dashboard, or by using the following steps:
- Download the plugin via WordPress.org
- Upload the ZIP file through the ‘Plugins > Add New > Upload’ screen in your WordPress dashboard
- Activate the plugin through the ‘Plugins’ menu in WordPress