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
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