FLW Announcement Banner
Who It’s For
- Site owners & marketers: Announce promotions, events, service notices, or policy updates site-wide in seconds.
- Agencies & multisite managers: Set network-wide defaults that individual sites can override.
- Performance-minded teams: Need a lightweight, cache-friendly banner that won’t conflict with CDNs.
Why This Plugin
- Always visible, always accessible: Displays at the top of every page with proper ARIA attributes.
- Caching-compatible: Inline CSS/JS ensures the banner appears even on cached pages.
- Zero fuss: No frameworks, shortcodes, or blocks—just a simple settings page.
- Visitor-friendly: Optional dismiss button remembers the choice per browser via localStorage.
Key Features
- Site-wide banner: Fixed at the top with smart admin-bar offsets.
- Accessible markup: Uses
role="region"and labels for assistive tech. - Custom content: Add a rich-text message (basic HTML supported).
- CTA support: Optional button/link with configurable new-tab behavior.
- Style controls: Choose background and text colors via hex values.
- Dismiss option: Per-visitor dismissal stored locally in the browser.
- FOUC reduction: Early head script hides dismissed banners before paint.
- Multisite defaults: Network admins can set global defaults; sites can override.
- Caching-friendly: No external scripts or dependencies.
- Developer-ready: Translatable strings and
flw_announcement_banner_cta_textfilter for customization.
Requirements
- WordPress: 6.0+
- PHP: 7.4+
- Permissions:
manage_options(site),manage_network_options(network) - Browser: LocalStorage recommended for persistent dismissal
Compatibility
- Themes: Hooks into
wp_body_open, with fallback towp_head. - Caching/CDNs: Designed for full compatibility.
- Multisite: Network-level defaults supported out of the box.
- Admin bar: Auto-offset for logged-in users.
Note: If your theme has a fixed header, you may need minor CSS adjustments to prevent overlap.
What It’s Not
- Not a cookie-consent or privacy tool.
- Not a scheduler—no timed or recurring campaigns.
- Not a multi-banner or targeting system (one global banner).
- Not analytics-enabled (no click or impression tracking).
- Not a visual builder—focused on simplicity, not design layouts.
Quick Start
- Install & activate: Upload and activate FLW Announcement Banner.
- Open settings: Go to Settings → FLW Announcement Banner (or via the FLW Plugins hub).
- Enable: Check “Show the banner on the frontend.”
- Add content: Enter your message (basic HTML allowed), optional CTA link, and new-tab option.
- Style it: Set background and text colors (hex).
- Dismiss option: Toggle “Allow visitors to dismiss.”
- Save: Click Save Changes, then view your site.
- (Multisite): In Network Admin, set network defaults under Settings → FLW Announcement Banner (Network Default).
Tip: Updating the message automatically resets previous dismissals for returning visitors.
