Skip to main content

better_messages_max_toasts_limit

REQUIREMENTS

To be able to implement this guide, you need to learn how to use JS snippets at your website.

One of guides: https://dev.to/david_woolf/how-to-get-started-with-wordpress-hooks-in-javascript-400o

Compatibility
This hook compatible with Better Messages 2.2.10 or higher
wp.hooks.addFilter('better_messages_max_toasts_limit', 'custom_action', function( maxToasts ){


return 2; // Display only 2 toasts (on site notifications) at the same time
})

Toasts (on site notifications): better_messages_max_toasts_limit