Skip to content

A WordPress add-on to publish custom alert messages that automatically expire on a specified date to the top of a website

Notifications You must be signed in to change notification settings

jrglass/alert-banner

 
 

Repository files navigation

Alert Banner for WordPress

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.

Instructions

  1. Put alert-banner.php in the same folder as header.php
  2. Add CSS from style.css to your WP theme's css. You can customize this as you see fit.
  3. Add the code from functions.php to your WP theme's functions.php file.
  4. Include alert-banner.php just after the opening <body> tag in header.php
<body>
  <?php include("alert-banner.php"); ?>
  ...
</body>
  1. 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.

Screenshots

  1. The WP dashboard view when creating/editing an alert banner
  2. The alert banner displaying on a website

About

A WordPress add-on to publish custom alert messages that automatically expire on a specified date to the top of a website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 79.4%
  • CSS 20.6%