Hi,
There is no built-in option to limit the mini widget to specific pages yet, but you can do it with a small code snippet — add it to your child theme’s functions.php or via a code snippets plugin:
add_action( 'wp', function () {
if ( is_user_logged_in() ) {
return;
}
if ( is_page( 'your-chat-page' ) ) {
return;
}
if ( function_exists( 'Better_Messages' ) && ! empty( Better_Messages()->mini_list ) ) {
remove_action( 'wp_footer', array( Better_Messages()->mini_list, 'html' ), 199 );
}
if ( function_exists( 'Better_Messages_Mini' ) ) {
remove_action( 'wp_footer', array( Better_Messages_Mini(), 'html' ), 200 );
}
} );
Replace your-chat-page with the slug (or ID) of the page where the chat should stay. With this snippet the floating widget is shown to guests only on that page and removed everywhere else — including the blog index, category archives and single posts. Logged-in users are not affected; if you want the same restriction for everyone, remove the is_user_logged_in() check.
If you instead only want to hide it on the blog templates and keep it everywhere else, replace the is_page( … ) condition with:
if ( ! ( is_home() || is_category() || is_single() ) ) {
return;
}
Thanks!