==== NWS Weather Alerts Banner === VER 1.0.6
This uses NWS County Codes
Downloads: 11
NWS Weather Alerts Banner
NWS Weather Alerts Banner displays active National Weather Service watches, warnings, and advisories in a configurable WordPress alert banner. It can monitor multiple counties or forecast zones and presents the results in a color-coded, expandable display.
Features
- Monitors multiple NWS counties or forecast zones.
- Supports NWS UGC codes such as
ARC031andARZ008. - Color-coded tornado, severe thunderstorm, flood, watch, and other alerts.
- Expandable alerts using ▼ / ▲ controls.
- Shows the monitored counties/zones at the top of the banner.
- Displays the latest update time.
- Can show the full NWS alert text.
- Configurable banner heading and subheading.
- Configurable no-alert message.
- Configurable banner width and colors.
- Configurable time zone.
- Configurable alert sorting and duplicate handling.
- Optional flood wording for Areal/River flood events.
- Server-side WordPress transient caching.
- Scheduled NWS data refresh using WP-Cron.
- Built-in NWS county/zone code test.
- Shortcode support.
Installation
- Upload the plugin ZIP through WordPress → Plugins → Add New Plugin → Upload Plugin.
- Activate NWS Weather Alerts Banner.
- Go to Settings → NWS Weather Alerts.
- Enter the counties or forecast zones you want to monitor.
- Configure the banner appearance and refresh interval.
- Place the shortcode on the page where you want the alerts displayed.
Shortcode
Use:
[nws_alerts]
The shortcode can be placed in a WordPress page, post, shortcode block, or widget area that supports shortcodes.
Configuring Counties and Forecast Zones
Enter one location per line using:
Location name|UGC code
Examples:
Craighead County, AR|ARC031
Greene County, AR|ARC055
Jonesboro Area|ARZ008
Multiple UGC codes can be assigned to one location by adding additional codes
separated with the | character.
What Are NWS UGC Codes?
The plugin uses National Weather Service Universal Geographic Codes (UGC) to request active alerts for a specific county or forecast zone.
ARC031— example Arkansas county code.ARZ008— example Arkansas forecast zone code.
County / Zone Code Test
The settings page includes a built-in test tool. Enter a UGC code and click Test County Code. The plugin checks the code directly against the NWS active-alert API and reports whether it is valid and how many active alerts were returned.
Example:
ARC031
Refresh Interval
The default refresh interval is 300 seconds (5 minutes). The setting can be configured from 60 seconds to 86,400 seconds.
The plugin uses both WP-Cron and a WordPress transient cache. When the cache is available, visitors receive the cached alert data rather than triggering a new NWS request.
Alert Colors
The default alert color categories are:
- Tornado: red
- Severe Thunderstorm: orange
- Flood: green
- Watch: yellow/gold
- Other: yellow
All of these colors can be changed from the plugin settings.
Expandable Alert Details
Each active alert can be expanded with the ▼ control. When open, the control changes to ▲. Depending on the available NWS alert information, the expanded area can contain the alert headline, affected area, expiration time, description, instructions, severity, urgency, certainty, and other NWS information.
Monitored Locations
The banner can show a Reporting on: section listing the configured counties or forecast zones. This allows visitors to see which areas the banner is monitoring.
Sorting and Duplicate Alerts
The plugin provides four alert-sorting modes:
- Location — show duplicate events
- Location — remove duplicate events
- Event — show duplicate events
- Event — remove duplicate events (recommended)
The plugin also removes duplicate alert records internally using the NWS alert ID.
Display Settings
The settings page includes options for:
- Banner heading
- Banner subheading
- No-alert message
- Banner width
- Time zone
- Centered or left-aligned text
- Alert title line breaks
- Last update time
- Monitored locations display
- Full alert expansion
- No-alert message visibility
- Flood terminology
- Location sorting
- Alert sorting
Color Settings
You can customize:
- Banner border color
- Heading background
- Body background
- Tornado alert color
- Severe thunderstorm color
- Flood alert color
- Watch color
- Other alert color
NWS Data
The plugin retrieves active alerts from the official National Weather Service API at:
For each configured UGC code, the plugin requests active alerts using the NWS zone endpoint. The WordPress server performs these requests, so visitors do not need an NWS API key.
Troubleshooting
No alerts are displayed
If there are no active alerts for the configured areas, the plugin displays the configured no-alert message when that option is enabled. Verify your UGC codes using the built-in Test County Code tool.
The wrong county or zone is being monitored
Check the UGC code. The location name is only the label shown to visitors; the UGC code determines which NWS alert area is queried.
Alerts seem delayed
Check the configured refresh interval and remember that WordPress WP-Cron depends on normal WordPress scheduled-task activity. The plugin also uses transient caching based on the configured interval.
County code test fails
Verify that the code follows the NWS UGC format and that the WordPress server can
make outbound HTTPS requests to api.weather.gov.
Banner is too wide or too narrow
Change the Banner width setting. The default is 99%.
Privacy
The plugin does not require visitor browser geolocation. It requests NWS alert data for the locations configured by the site administrator.
Credits
Alert information is provided by the National Weather Service (NWS) through its public API.
License
NWS Weather Alerts Banner is released under the GNU General Public License, version 2 or later.
Disclaimer
Do not rely solely on this plugin for making life-safety, travel, or critical operational decisions.
NWS alerts can be issued, updated, expanded, cancelled, or expired at any time. Always consult official National Weather Service warnings and local emergency management authorities when severe weather threatens.
