Context-aware notices for posts & pages
Show a Bootstrap-style banner at the top or bottom of your posts and pages—automatically—based on flexible rules like publish date window, post age, categories, tags, post type, and title keywords. Perfect for flagging outdated content, adding disclaimers, or pointing readers to newer guides.
• Download Post Notice
• WordPress.org listing (coming soon)
Who it’s for
• Bloggers and publishers who want to mark older posts without deleting them
• Sites that need category/tag-specific disclaimers (finance, health, legal, etc.)
• Teams running seasonal promos or migrations who need quick, targeted banners
• Anyone who wants consistent, low-maintenance “context” on content
What you can do with it (use cases)
• Outdated content: “This article is over 2 years old—see the updated guide.”
• Disclaimers: Show legal/editorial notes on specific categories or tags.
• Promotions: Run a launch or seasonal banner for a date range.
• Content series: When the title contains a keyword, link to the next part.
• Migrations: Send readers to your new site or canonical page.
• Localization: Mark posts that only apply to certain regions/versions.
How it works
- Create a notice (Post Notices → Add New) and write your message (supports simple HTML).
- Set rules:
• Publish date window: show for posts published on/after and/or on/before specific dates
• Older than X days
• Categories and tags (any match)
• Post types (posts, pages, or custom types)
• Title keywords (ANY or ALL) - Choose appearance:
• Bootstrap-style color (primary, secondary, success, danger, warning, info, light, dark)
• Placement: before or after content (per-notice), with a site-wide default
• Dismissible option
• Optional link (URL + link text) - Save. New notices are enabled by default. The plugin auto-inserts the banner before/after content; you can also place it manually with a shortcode.
Features at a glance
• Rules engine: date window, age, categories, tags, post types, title keywords
• Per-notice placement (before/after) + global default
• Bootstrap-like styling (works even if your theme doesn’t load Bootstrap)
• Dismiss button with local persistence
• Lightweight rendering with recursion guard (no heavy “the_content” loops)
• No tracking • i18n-ready
Shortcode (optional)
Use this inside a post or page if you prefer manual placement:
[postnotice]
Design & styling
• Matches Bootstrap alert colors (primary/secondary/success/danger/warning/info/light/dark)
• Ships a tiny, namespaced fallback CSS so alerts look right even without Bootstrap
Admin experience
• Simple “Post Notices” editor with “Rules” and “Appearance” panels
• Classic editor UI for clarity (meta boxes on the right)
• Help tabs explain each field (date logic, keywords, etc.)
• New notices start enabled by default
Optional endpoints (for site owners)
• Self-hosted update metadata while preparing for WordPress.org
• Remote admin message (e.g., release notes) shown in the dashboard
Privacy & performance
• No telemetry or tracking—ever
• Lean rule matching, cached results, recursion safeguards
• Safe on busy sites
Compatibility
• WordPress 6.3+ (tested to 6.7)
• PHP 7.4+
• Works with posts, pages, and custom post types
FAQ
Q: Will this work without Bootstrap?
A: Yes. We include a tiny, namespaced CSS so alerts still look like Bootstrap.
Q: What do the date fields compare against?
A: “On/after” and “on/before” compare to the post’s publish date (UTC). “Older than (days)” compares today to the publish timestamp.
Q: Can I show more than one notice?
A: Yes—enable “Multiple notices” in Settings → Post Notice.
Q: Can developers customize output or rules?
A: Yes. Filters include postnotice_notice_content (modify final HTML) and postnotice_rule_match (extend rule logic).
Get started
- Install and activate the plugin
- Add your first notice with rules and appearance
- Set your site-wide auto-insert preference (before/after/none)
- (Optional) Place notices manually with the [postnotice] shortcode
