# OceanWP: Notice Bar Below the Header

> Shows a notice bar right after the OceanWP header on every page, for announcements that should be seen but not block the menu.

- Type: PHP
- Runs: Frontend only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: oceanwp, header, notice
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/oceanwp-notice-after-header/

## Code

```php
// Message to show.
$wpide_ocean_notice = 'New: same-day pickup is now available in store.';

add_action( 'ocean_after_header', function () use ( $wpide_ocean_notice ) {
    if ( '' === trim( $wpide_ocean_notice ) ) {
        return;
    }

    echo '<div class="wpide-ocean-notice" role="status" style="background:#13aff0;color:#fff;text-align:center;padding:10px 16px;">' . wp_kses_post( $wpide_ocean_notice ) . '</div>';
} );
```

## Notes

Leave the message empty to hide it.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "OceanWP: Notice Bar Below the Header" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
