A lightweight, flexible, and developer-friendly notice bar plugin for WordPress.
Display announcements, alerts, or CTAs at the top or bottom of your site with full control over visibility and behavior.
- ✅ Enable / Disable notice bar
- 📍 Position: Top or Bottom
- 📝 Message supports safe HTML (links, strong, em)
- 🎨 Custom colors (background, text, CTA)
- 🔘 Optional CTA button (with new-tab support)
- ❌ Dismiss options:
- Session only
- For N days
- Forever
- 🧠 Smart display rules:
- Entire site / Home / Posts / Pages
- Include or exclude specific post/page IDs
- Logged-in users only
- User role targeting
- ⚡ Optimized performance (assets load only when needed)
- 🧩 Developer hooks & filters
- 🧼 Clean, modern, namespaced OOP architecture
-
Clone or download this repository:
git clone https://github.com/mukesh0272/wp-quick-notice.git -
Move it to:
wp-content/plugins/wp-quick-notice -
Run:
composer dump-autoload -
Activate WP Quick Notice from WP Admin → Plugins
-
Configure via Settings → WP Quick Notice
- Download the ZIP from GitHub
- Go to WP Admin → Plugins → Add New → Upload Plugin
- Upload and activate
- Go to Settings → WP Quick Notice
- Enable the notice bar
- Add your message
- Customize position, colors, CTA, and dismiss behavior
- Configure display rules
- Save — done 🎉
WP Quick Notice is built with extensibility in mind.
add_filter('wpqn_options', function ($options) {
$options['position'] = 'bottom';
return $options;
});
add_filter('wpqn_should_render', function ($should_render, $options) {
if (is_page(42)) {
return false;
}
return $should_render;
}, 10, 2);
add_filter('wpqn_message_html', function ($html, $options) {
return $html . '<span class="extra-text"> Limited time!</span>';
}, 10, 2);
wp-quick-notice/
├─ assets/
│ ├─ css/
│ └─ js/
├─ src/
│ ├─ Admin/
│ ├─ Frontend/
│ └─ Support/
├─ wp-quick-notice.php
├─ composer.json
├─ README.md
├─ readme.txt
├─ uninstall.php
└─ LICENSE
- Uses WordPress Settings API
- All inputs sanitized and escaped
- Safe HTML via
wp_kses - Capability checks for admin actions
- Shortcode support
- Gutenberg block
- REST API integration
- Multisite support
- Translation template (
.pot)
Licensed under the MIT License.
If you find this plugin useful:
- Star the repository
- Report bugs
- Suggest features