This is a WordPress add-on to publish custom alert messages that automatically expire on a specified date to the top of a website.
alert-banner.php is dependent on the Advanced Custom Fields plugin to work.
- Put
alert-banner.php
in the same folder asheader.php
- Add CSS from
style.css
to your WP theme's css. You can customize this as you see fit. - Add the code from
functions.php
to your WP theme'sfunctions.php
file. - Include
alert-banner.php
just after the opening<body>
tag inheader.php
<body>
<?php include("alert-banner.php"); ?>
...
</body>
- Upload the
acf-export-alert-banner.json
file to WordPress using the Advanced Custom Fields plugin's import function. If you do not see this option in ACF, you may need to update the plugin.