Table of Contents
Announcements Bar functionality allows you to insert custom messages or any other type of information on the top of all your pages. You can choose between two types of bars depending on your preference, both of them are described below.
Checkbox Enable turns on Announcement Bar functionality and the exact time when the bar is displayed can be defined with options Date From and Date To:
- if both dates are defined, bar is displayed exactly in defined range
- if only “from” date is defined, bar is displayed all the time after defined date and time
- if only “to” date is defined, bar is displayed only to the defined date and time, after this time is bar automatically disabled
- if no dates are defined, bar is always displayed (if checkbox Enable is checked)
Make sure you have set up correct Timezone in WordPress General settings to make dates settings working correctly.
Simple type
A simple type of bar allows you to write plain text with basic HTML tags for text like <a>, <br>, <em>, <i>, <strong>
and a button with a custom link. General styling for a simple type of bar is predefined and the bar is intended to show simple text information.
Color settings for bar background and button can be found in WordPress Customizer under the Announcements Bar tab.
Advanced type
To have full control over the content and design of the Announcement Bar are available advanced settings of the bar. You can write custom HTML and CSS for the bar to show it exactly as you want.
In Customizer settings is available checkbox Show preview of Announcement Bar which shows bar only in customizer even the bar has hidden no frontend. The bar is displayed independently on dates settings in admin, so you can prepare HTML and design for your bar and keep the bar hidden on the frontend. Once the bar will be ready, you can enable it for the frontend in admin Announcements Bar settings.