Show breaking news ticker with shortcode/code inside your header, add custom background color, text color or even custom title, extended to work with date picker so you never need to disable it.
- Change custom title
- Change background color
- Change color of text
- Upload the plugin files to the
/wp-content/plugins/ap-breaking-news
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress
- Go to Settings/Tools -> AP Breaking News -> Change things you need
- Go to your theme header.php and put
<?php echo do_shortcode('[ap-breaking-news]'); ?>
- You don't need to worry about dates that much, the plugin will show the latest (expiration date), so the highest
expire date
will be shown before others. - Please visit the website after post changes/update so everything gets updated in places
- Post with expiration date have advantages over normal (just checked "Make this breaking news")
- For normal themes use shortcode
<?php echo do_shortcode('[ap-breaking-news]'); ?>
- For Gutenberg ready themes (HTML blocks) please use this code
<!-- wp:shortcode --> [ap-breaking-news] <!-- /wp:shortcode -->
AP breaking news should work with any theme, place a shortcode/code and adjust settings in backend (Color, Background) if needed adjust/add custom CSS.
- You can target
#abpn-container
or.apbn-container
- Check did you enable plugin
- Clear Cache
- Go to Settings > Save Permalinks
- Go to Latest post and check (Make this post breaking news)
- Save the page
- Visit the link
- Check did you place shortcode in right place, its usually on this places:
- yourtheme/header.php
- yourtheme/template-parts/header/site-header.php
- yourtheme/block-template-parts/header.html
- yourtheme/parts/header.html
./vendor/bin/phpcs -i
./vendor/bin/phpcs --standard=WordPress D:\wordpress\wp-content\plugins\ap-breaking-news\admin\any-file.php