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.phpin the same folder asheader.php - Add CSS from
style.cssto your WP theme's css. You can customize this as you see fit. - Add the code from
functions.phpto your WP theme'sfunctions.phpfile. - Include
alert-banner.phpjust after the opening<body>tag inheader.php
<body>
<?php include("alert-banner.php"); ?>
...
</body>
- Upload the
acf-export-alert-banner.jsonfile 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.