# Kadence: Message Bar Above the Header

> Adds a slim announcement bar above the Kadence theme header on every page, using Kadence's own header hook.

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

## Code

```php
// Message to show above the header.
$wpide_kadence_bar = 'Holiday orders: order by <strong>Dec 18</strong> for delivery before Christmas.';

add_action( 'kadence_before_header', function () use ( $wpide_kadence_bar ) {
    if ( '' === trim( $wpide_kadence_bar ) ) {
        return;
    }

    echo '<div class="wpide-kadence-bar" style="background:#1f2937;color:#fff;text-align:center;font-size:14px;padding:8px 16px;">' . wp_kses_post( $wpide_kadence_bar ) . '</div>';
} );
```

## Notes

Leave the message empty to hide it. Edit the colors in the inline style.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Kadence: Message Bar Above 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/
