1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Hide the OneSignal Admin Notice

How to Hide the OneSignal Admin Notice

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

  1. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  2. Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, click Theme Functions (functions.php).
  4. 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 }
  1. Click Update File to save your changes.

This code hides the OneSignal admin notice in the BuddyBoss admin dashboard without affecting other functionality.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

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.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.