VibeCode Notice Bar

外掛說明

VibeCode Notice Bar adds a simple announcement bar to the top or bottom of your WordPress site. Use the notification bar to promote a sale, announce free shipping, warn about maintenance, or point visitors at a new post with a call to action button.

It does one job and stays out of your way. There are no advertisements in your dashboard, no deactivation survey, no phoning home, and no data collection of any kind.

Why this plugin

Most notification bar plugins are heavier than the message they display. This one loads a single small stylesheet and, only if you enable the dismiss button, about half a kilobyte of JavaScript. Nothing else is queued on your front end.

  • Theme safe. The bar is inserted with the wp_body_open hook, or wp_footer if you place it at the bottom, instead of being positioned over your page. It sits above your header without overlapping it or breaking your layout.
  • Cache friendly. Every visitor receives identical HTML and the dismissal is handled in the browser, so the announcement bar works correctly behind WP Rocket, LiteSpeed Cache, W3 Total Cache, Cloudflare and other full page caches.
  • No flash of dismissed content. A tiny inline check runs before the bar renders, so a visitor who already closed your banner never sees it blink on screen.
  • Honest links. If your button link is empty or invalid, the button is simply hidden. It will never send your visitors anywhere you did not choose.

Features

  • Announcement bar at the top or bottom of the page
  • Optional sticky notification bar that follows the visitor as they scroll
  • Call to action button with its own colours and an optional new tab
  • Full colour control for background, text and button
  • Adjustable font size
  • Optional dismiss button, with a configurable number of days before the bar returns
  • Automatically shows a new announcement again even to visitors who dismissed the previous one
  • Option to hide the banner on small screens
  • Accessible markup with a labelled region and a keyboard reachable close button
  • Respects prefers-reduced-motion
  • Translation ready
  • Removes its own settings when you uninstall it

Privacy

This plugin does not collect, transmit or store any personal data. It makes no external HTTP requests. The dismiss state is kept in the visitor’s own browser using local storage, never in a cookie sent to your server.

Developer notes

Filter lwab_show_bar to control display on a per request basis:

add_filter( 'lwab_show_bar', function ( $show ) {
    return is_front_page() ? $show : false;
} );

螢幕擷圖

安裝方式

  1. Upload the plugin folder to /wp-content/plugins/, or install it from the Plugins screen in your dashboard.
  2. Activate the plugin.
  3. Go to Settings Announcement Bar, write your message, tick Enable bar and save.

常見問題集

Does the announcement bar work with caching plugins?

Yes. The HTML is the same for every visitor and the dismiss check happens in the browser, so page caching cannot serve the wrong state.

Will it overlap my theme header?

No. A top bar uses the wp_body_open hook and a bottom bar uses wp_footer, so it sits in the normal document flow rather than being positioned over your header. If your theme is older than WordPress 5.2 and does not support wp_body_open, ask your theme author to add it.

Can visitors close the notification bar?

Yes, if you enable the dismiss button. You choose how many days it stays closed. Setting the value to zero closes it for the current browser session only.

What happens when I change my message?

The bar reappears for everyone, including visitors who dismissed the previous announcement. A new message is treated as a new announcement.

Does it add advertisements to my dashboard?

No. There are no advertisements, no upsell notices and no deactivation survey.

Can I show more than one bar?

The free version shows a single announcement bar.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈VibeCode Notice Bar〉的開發相關工作。

參與者

將〈VibeCode Notice Bar〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.0

  • Initial release.