Description
News Ticker adds a slim announcement bar to your site — for a sale, a deadline, a service notice or any other message that should not wait for the next blog post.
Each announcement is a separate item with its own headline, teaser and button, so you can prepare several of them and switch them on and off one by one. If more than one item is live, the bar rotates between them. If a message is too long for the available width, the text scrolls while the button stays put on the right.
Features
- Unlimited announcement items, each with headline, teaser and a button (label + link)
- Publish or unpublish items individually, plus an optional start and end date per item
- Automatic rotation when several items are live, paused on hover and keyboard focus
- Scrolling text only when it is actually needed — the button never moves
- Optional fixed bar at the top of the viewport, with the page content offset automatically
- Show the bar on all pages or on the front page only
- Place the bar right after the opening body tag, inside any element of your theme, or wherever your template prints it
- Optional dismiss button, either remembered across visits or for the current page view
- Stylesheet and script can each be switched off if you prefer your own
- No dependencies, no external requests, no tracking. Plain CSS and vanilla JavaScript.
Styling
The bar ships with a yellow background and black text and exposes every colour as a CSS custom property, so a theme can restyle it without fighting specificity:
.neuedaten-news-ticker {
--neuedaten-news-ticker-bg: #ffdd00;
--neuedaten-news-ticker-fg: #000;
--neuedaten-news-ticker-button-bg: #000;
--neuedaten-news-ticker-button-fg: #ffdd00;
}
Placing the bar from your theme
Set “Position in the DOM” to Placed by the theme and print it wherever you like — this renders server side, so there is no layout shift:
<?php
if ( function_exists( 'neuedaten_news_ticker_has_items' ) && neuedaten_news_ticker_has_items() ) {
neuedaten_news_ticker_render();
}
?>
neuedaten_news_ticker_get_html() returns the markup instead of printing it, and the `[news_ticker]` shortcode works in content.
For developers
neuedaten_news_ticker_items— filter the items before they are renderedneuedaten_news_ticker_should_render— decide per request whether the bar appearsneuedaten_news_ticker_before_render— action fired right before the markup is printedneuedaten_news_ticker_html— filter the final markupneuedaten_news_ticker_settings— filter the resolved plugin settings
Screenshots



Installation
- Upload the plugin folder to
/wp-content/plugins/or install it through the Plugins screen. - Activate the plugin.
- Go to Info Ticker and add your first item: headline, teaser, button label and link.
- Publish the item.
- Adjust Info Ticker Settings if you want a different position, scope or dismiss behaviour.
FAQ
-
How do I deactivate a single announcement?
-
Set the item to draft. Only published items inside their schedule are shown.
-
What happens if several items are live at the same time?
-
The bar rotates between them. You can set the interval under Info Ticker Settings; rotation pauses while a visitor hovers over the bar or focuses an element inside it.
-
The text does not scroll. Is something broken?
-
The text only scrolls when it does not fit into the available width. Make the browser window narrower, or use a longer teaser, to see it.
-
How do I place the bar inside my own header?
-
Two ways. Without touching your theme, choose “Inside a target element” under Info Ticker Settings and enter a CSS class or ID, for example
.page-header. The bar is inserted as the first child of the first matching element; this needs the plugin JavaScript, and the fixed position option is ignored.If you can edit your theme, choose “Placed by the theme” instead and call
neuedaten_news_ticker_render()in your template. That renders server side, so the bar is there from the first paint and reserves its space without a layout shift. -
Does it work without JavaScript?
-
Yes, with reduced functionality. The first live item is shown, the text is truncated instead of scrolling, and the dismiss button is hidden.
-
Can I change the colours?
-
Yes, through the CSS custom properties listed in the description, or by switching the plugin stylesheet off and writing your own.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Neuedaten News Ticker” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Neuedaten News Ticker” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release.
