Introduction
OneSignal may display an admin notice prompting you to enter new API keys to continue sending web push notifications. If you prefer to hide this notice without updating the keys, you can do so by adding a small custom function to your active theme. This guide explains how to hide the OneSignal admin notice in BuddyBoss.
Custom Workaround
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
- From the Theme Files list, click Theme Functions (functions.php).
- Paste the following code just before the closing PHP tag (?>):
add_action('admin_head', 'wphelp_hide_notices_wp');
function wphelp_hide_notices_wp() { ?>
<style>
.buddypress .wrap div#message,
.buddypress .wrap div.notice {
display: none;
}
</style>
<?php }
- Click Update File to save your changes.
This code hides the OneSignal admin notice in the BuddyBoss admin dashboard without affecting other functionality.
Troubleshooting and FAQs
Q: The notice is still visible after adding the code.
A: Clear your browser cache or refresh the admin dashboard. Make sure the code is added to your active theme’s functions.php file.
Q: Will this hide all admin notices?
A: This snippet hides notices within the BuddyPress/BuddyBoss admin pages. Notices outside these areas may not be affected.
Q: Can I undo this later?
A: Yes. Simply remove the code from functions.php and save the file.
Q: Does hiding the notice affect OneSignal functionality?
A: No. The notice is only a visual reminder. Hiding it will not change how OneSignal works.
Q: Where can I find more guidance on reconnecting OneSignal?
A: You can check this YouTube tutorial: Reconnect Your OneSignal account to BuddyBoss for Web Push Notifications.