Description
Floating News Headline is a professional-grade, lightweight news ticker plugin designed for speed, beauty, and zero theme conflicts. Display breaking news, latest posts, hand-picked headlines, or custom alerts in a sleek, non-intrusive floating bar on your WordPress site.
Built from the ground up with a modern React admin dashboard and GPU-accelerated BEM-CSS architecture, this plugin delivers silky-smooth scrolling animations without slowing down your website.
š Why Choose Floating News Headline?
Unlike other ticker plugins that rely on heavy jQuery dependencies and outdated markup, Floating News Headline uses:
- Vanilla JavaScript on the frontend ā zero jQuery dependency
- CSS
transform: translateX()animations ā GPU-accelerated for 60fps scrolling - BEM (Block-Element-Modifier) CSS ā zero naming collisions with your theme
- WordPress Transient API ā intelligent caching to minimize database queries
- PSR-4 Style Autoloading ā clean, maintainable PHP architecture
- WordPress REST API ā secure, nonce-verified AJAX communication
šØ 3 Premium Themes Included (Free)
- Corporate Classic ā Clean, professional Indigo-themed design with post thumbnails, author metadata, and a document icon label. Perfect for business and corporate sites.
- Dark Night ā Sleek, high-contrast Slate design with emerald status pulses, gradient blur overlays, and pipe dividers. Ideal for tech, gaming, and entertainment sites.
- Floating Pill ā Modern, bubble-style Emerald design with glassmorphism blur effects and rounded corners. Great for blogs, startups, and creative portfolios.
ā Key Features
- Instant Live Preview ā See your ticker changes in real-time within the admin dashboard before saving. No page refresh required.
- Multi-Source Content ā Pull headlines from your latest blog posts, manually select specific posts, or write a custom alert message with a link.
- Manual Post Picker ā Search and select up to 5 specific posts (free version) to display in your ticker with a beautiful search UI.
- Customizable Speed ā Control the scrolling speed from 5s (fast) to 100s (slow) with an intuitive range slider.
- Item Spacing Control ā Adjust the gap between ticker items from 0px to 200px for the perfect visual density.
- Page Targeting ā Choose to show the ticker on all pages or only on the homepage/front page.
- Scroll Behavior ā Choose between “Fixed” (always visible) or “Sticky on Scroll” (appears after scrolling down).
- Sticky Top Placement ā Automatically inject the ticker at the very top of your site using
wp_body_open, or place it anywhere with a shortcode. - Play / Pause Control ā Users can pause and resume the ticker with a built-in toggle button. Accessible with proper
aria-labelattributes. - Seamless Infinite Loop ā Headlines scroll continuously with a duplicated group technique ā no gaps, no stuttering.
- Short Content Protection ā If total headline text is too short for a seamless loop, the plugin automatically multiplies items to prevent visual breaks.
- Customizable Labels ā Change the ticker label text (e.g., “Breaking News”, “Latest Updates”) from the admin panel.
- Responsive Design ā Looks great on desktop, tablet, and mobile devices with adaptive layouts.
- Lightweight & Fast ā Under 40KB total frontend footprint (CSS + JS). No external CDN dependencies.
- Settings Migration ā Automatically migrates settings from the legacy
fnh_settingsoption key to the newfloating_news_headline_settingskey. - Developer Hooks ā Filter
floating_news_headline_itemsto programmatically modify ticker items before rendering.
š Security
- All REST API routes are protected with
manage_optionscapability checks - Input sanitization using
sanitize_text_field(),sanitize_key(),intval(), andesc_url_raw() - Output escaping using
esc_html(),esc_attr(), andesc_url()in all templates - Nonce verification via WordPress REST API
X-WP-Nonceheader - ABSPATH checks on all PHP files to prevent direct access
šļø Architecture
- Namespace:
FloatingNewsHeadline - Autoloader: PSR-4 style with
spl_autoload_register - Classes:
Activator,Adapter,Admin,Assets,Deactivator,Frontend,REST_API,Settings - Templates:
corporate.php,dark.php,pill.php(BEM-structured HTML) - Build System:
@wordpress/scriptswith custom Webpack config for dual entry points (index.jsfor admin,frontend.jsfor public)
Installation
Automatic Installation
- Go to Plugins Add New in your WordPress admin.
- Search for “Floating News Headline”.
- Click Install Now, then Activate.
- Navigate to News Headlines in your admin sidebar to configure your ticker.
Manual Installation
- Download the plugin ZIP from WordPress.org.
- Go to Plugins Add New Upload Plugin.
- Upload the ZIP file and click Install Now.
- Activate the plugin through the Plugins menu.
From Source (Developers)
- Clone the repository into
/wp-content/plugins/floating-news-headline. - Run
npm installto install dependencies. - Run
npm run buildto compile the React admin and frontend assets. - Activate the plugin in WordPress.
After Activation
- The ticker will automatically appear at the top of your site if “Sticky Top” placement is selected (default).
- To place it manually, use the shortcode
[fnh_ticker]or[floating_news_headline_ticker]in any post, page, or widget.
FAQ
-
How do I enable/disable the ticker?
-
Go to News Headlines in your WordPress admin. Use the toggle switch in the top-right corner of the dashboard to enable or disable the ticker globally.
-
Can I use it as a shortcode?
-
Yes! Use
[fnh_ticker]or[floating_news_headline_ticker]in any page, post, or text widget. When using shortcode placement, set the placement to “Shortcode” in the admin dashboard. -
Does it support custom post types?
-
The free version supports standard Posts and Pages. The Pro version will support all registered custom post types.
-
Can I show the ticker only on the homepage?
-
Yes. In the Visibility tab, set “Display On” to Homepage Only. The ticker will only appear on the front page and blog index page.
-
How do I change the ticker speed?
-
Go to the Animation tab in the admin dashboard. Use the speed slider to adjust from 5 seconds (fastest) to 100 seconds (slowest). The live preview updates instantly.
-
How do I change the label text?
-
In the Content tab, scroll down to the Label field. You can change it to anything like “Breaking News”, “Trending”, “Headlines”, etc.
-
Will it slow down my website?
-
No. The frontend uses vanilla JavaScript (no jQuery), GPU-accelerated CSS animations (using
transform: translateX()), and WordPress Transient caching (10-minute cache). The total frontend footprint is under 40KB. -
Does it conflict with my theme?
-
Very unlikely. All CSS uses the BEM naming convention with the
fnh-prefix, which prevents naming collisions. The ticker is injected viawp_body_openor shortcode, both of which are standard WordPress hooks. -
Can I display a custom alert instead of posts?
-
Yes. In the Content tab, select Custom Alert as the source. Enter your alert text and an optional link URL.
-
How does caching work?
-
The plugin uses WordPress Transients to cache fetched post data for 10 minutes. When you save settings, the cache is automatically invalidated using a versioned cache key strategy ā no raw SQL needed.
-
Is the plugin translatable?
-
Yes. The plugin uses the
floating-news-headlinetext domain. All user-facing strings are wrapped in appropriate WordPress i18n functions. You can translate it using Loco Translate or any .po/.mo editor. -
What hooks and filters are available?
-
- Filter:
floating_news_headline_itemsā Modify the array of ticker items before they are rendered. Receives$items(array) and$settings(array).
- Filter:
Reviews
Contributors & Developers
“Floating News Headline” is open source software. The following people have contributed to this plugin.
Contributors“Floating News Headline” has been translated into 1 locale. Thank you to the translators for their contributions.
Translate “Floating News Headline” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.3.2 ā 2026-04-01
- New: Dedicated “Shortcode” documentation tab in the admin dashboard for easier manual placement reference.
- Fix: Synchronized Dashboard Preview height and theme icons (Corporate Classic document icon) with the live site.
- Fix: Synchronized scroll speed logic between the admin preview and the frontend for a matching experience.
- Enhancement: Decoupled shortcode visibility from site-wide targeting rules ā shortcodes now work on any page regardless of “Display On” settings.
1.3.1 ā 2026-03-31
- New: “Scroll Behavior” setting in Visibility tab ā Choose how the headline bar behaves on page scroll.
- New: “Fixed” mode ā Visible at top, hides after scroll (Default).
- New: “Sticky on Scroll” mode ā Always visible at the top, stays sticky while you scroll down.
- Enhancement: Flattened design for all ticker themes (Corporate, Dark) and Admin UI for a modern sharp look.
- Enhancement: Emerald Floating Pill theme updated with a flat bar but kept rounded label for a unique look.
- Fix: Resolved double caret icons in admin dropdowns (Display Target Pages).
- Fix: Solid background for Corporate Classic template to prevent transparency when sticky.
- Optimization: Added rAF-throttled scroll listener for performance.
1.3.0 ā 2026-03-31
- Complete Architectural Rebuild ā Entire plugin rewritten from scratch with modern PHP (namespaced, PSR-4 autoloaded) and a React-based admin dashboard.
- New: High-fidelity React admin dashboard with instant live preview
- New: 3 premium themes ā Corporate Classic, Dark Night, Floating Pill
- New: GPU-accelerated CSS marquee animation using
transform: translateX() - New: BEM CSS architecture for zero theme conflicts
- New: WordPress Transient caching with versioned cache keys for performance
- New: REST API powered settings with full sanitization and nonce verification
- New: Manual Post Picker with search UI (up to 5 posts in free version)
- New: Custom Alert source with link support
- New: Page targeting (all pages or homepage only)
- New: Configurable speed (5sā100s) and item spacing (0pxā200px)
- New: Play/Pause toggle button with accessible ARIA labels
- New: Seamless infinite loop with short content protection
- New: Settings migration from legacy
fnh_settingsoption key - New: Developer filter
floating_news_headline_items - New: Get Pro sub-menu page with upgrade information
- Security: All inputs sanitized, all outputs escaped, capability checks on all REST routes
- Performance: Under 40KB frontend footprint, no jQuery dependency, no CDN resources
1.2.0
- Fix: Synchronized REST API namespaces for better stability.
- Optimization: Removed redundant character decoding in data adapter.
- Compliance: Updated readme and license headers for WP.org.
1.1.0
- Initial beta architecture with basic ticker functionality.
1.0.0
- Initial release.
