Title: National Weather Service Alerts
Author: John Russell
Published: <strong>نونبر 4, 2014</strong>
Last modified: فبراير 8, 2018

---

Search plugins

![](https://ps.w.org/national-weather-service-alerts/assets/banner-772x250.png?rev
=1019219)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/national-weather-service-alerts/assets/icon.svg?rev=1019219)

# National Weather Service Alerts

 By [John Russell](https://profiles.wordpress.org/laubsterboy/)

[Download](https://downloads.wordpress.org/plugin/national-weather-service-alerts.1.3.5.zip)

 * [Details](https://ary.wordpress.org/plugins/national-weather-service-alerts/#description)
 * [Reviews](https://ary.wordpress.org/plugins/national-weather-service-alerts/#reviews)
 *  [Installation](https://ary.wordpress.org/plugins/national-weather-service-alerts/#installation)
 * [Development](https://ary.wordpress.org/plugins/national-weather-service-alerts/#developers)

 [Support](https://wordpress.org/support/plugin/national-weather-service-alerts/)

## Description

The National Weather Service Alerts plugin allows you to easily display weather 
alerts on your website. The
 alerts are pulled directly from the National Weather
Service (http://alerts.weather.gov) based on the location that you specify and are
then parsed, sorted, and output to your website. The alerts are then automatically
updated using AJAX, based on the severity of the alerts for the specified location.
The location can be set by using zipcode, city and state, or state and county. There
is also the option to choose the scope of what alerts to include, such as alerts
only for your county, alerts only for your state, or alerts for the entire United
States.

If applicable, a Google Map will be included with polygon overlays to show the affected
regions of certain alert
 types, such as tornado warnings or flash flood warnings.

_Currently the National Weather Service Alerts plugin only works for areas within
United States. However, the
 plugin expects Atom feeds that use the Common Alerting
Protocol (CAP) format so in theory any CAP feed could be used.

**Features**

 * Shortcode
 * Widget
 * NWS Alerts settings page for adding the Alerts Bar
 * Clean html5 markup
 * CSS classes that make it easy to override default styles
 * Developer API (filters)

**Weather Alerts**

 * Tornado Warning
 * Severe Thunderstorm Warning
 * Flash Flood Warning
 * Flood Warning
 * Blizzard Warning
 * Winter Storm Warning
 * Freeze Warning
 * Dust Storm Warning
 * High Wind Warning

*The default weather alert types can be modified using the ‘nws_alerts_allowed_alert_types’

and ‘nws_alerts_sort_alert_types’ filter hooks.

## Screenshots

[⌊Full display example - with no Google map⌉⌊Full display example - with no Google
map⌉[

_Full display example – with no Google map_

[⌊Full display example - with Google map⌉⌊Full display example - with Google map⌉[

_Full display example – with Google map_

[⌊Shortcode builder in the page/post editor⌉⌊Shortcode builder in the page/post 
editor⌉[

_Shortcode builder in the page/post editor_

[⌊Widget⌉⌊Widget⌉[

_Widget_

[⌊Alerts Bar example - with Google map⌉⌊Alerts Bar example - with Google map⌉[

_Alerts Bar example – with Google map_

## Installation

 1. Go to Plugins > Add New in the admin area, and search for National Weather Service
    Alerts.
 2. Click install.
 3. Once installed, activate the plugin.
 4. Lastly, go to the NWS Alerts settings page and click **Build Database Tables**.

**Note that building the database tables used for location searching can take up
to a minute to complete, so please be patient. The process is monitored via AJAX
and a status bar will update you on the progress of the build process. These tables
are deleted from the database when the plugin is deactivated, and then deleted, 
in the WordPress admin Plugins area.**

Once the plugin is installed and activated you can easily add weather alerts to 
your website by using the included NWS Alerts widget or by using the [nws_alert]
shortcode. The plugin adds a “National Weather Service Alerts” button to the WordPress
editor that can be used to build properly formatted nws_alert shortcodes.

For further documentation and developer reference check out the GitHub repository:
https://github.com/laubsterboy/national-weather-service-alerts

## FAQ

  Installation Instructions

 1. Go to Plugins > Add New in the admin area, and search for National Weather Service
    Alerts.
 2. Click install.
 3. Once installed, activate the plugin.
 4. Lastly, go to the NWS Alerts settings page and click **Build Database Tables**.

**Note that building the database tables used for location searching can take up
to a minute to complete, so please be patient.
 The process is monitored via AJAX
and a status bar will update you on the progress of the build process. These tables
are deleted from the database when the plugin is deactivated, and then deleted, 
in the WordPress admin Plugins area.

Once the plugin is installed and activated you can easily add weather alerts to 
your website by using the included
 NWS Alerts widget or by using the [nws_alert]
shortcode. The plugin adds a “National Weather Service Alerts” button to the WordPress
editor that can be used to build properly formatted nws_alert shortcodes.

For further documentation and developer reference check out the GitHub repository:
https://github.com/laubsterboy/national-weather-service-alerts

  I’m only seeing the following message: The specified location could not be found.
Try specifying a county and state instead.

The plugin is letting your know that there was an error when attempting to retrieve
additional location information
 about the specified location. Check for spelling
errors in the city or county name. On rare occasion the locations database table
may not include the specified city and is thus unable to retrieve additional information
necessary for the plugin to function properly and the only workaround is to instead
use the zipcode. If you continue to seeing this error, despite trying the above 
fixes, please try deactivating and deleting the plugin and re-installing.

  I’m seeing the following message: Data Error

The plugin will show this message when it is unable to retrieve the Atom feed from
the National Weather Service.
 It is rare for this to happen and when it does it’s
generally because the Atom feed is temporarily unavailable. Simply refreshing the
page should fix the problem.

## Reviews

![](https://secure.gravatar.com/avatar/7e54fc96cc93e4e3f479a04dd40290bec7ea4dd713faa943e11d348f389aa995?
s=60&d=retro&r=g)

### 󠀁[Great Concept; needs code revisions](https://wordpress.org/support/topic/great-concept-needs-code-revisions/)󠁿

 [inhousewebdesign](https://profiles.wordpress.org/inhousewebdesign/) يناير 9, 2019

This plugin is a great concept but doesn't work correctly on the Android phone it
was tested. The Weather Warning top bar appears with icon and link to NOAA but it
makes the underlying Web pages covered up with a white page. I'm guessing this is
a place holder but instead of lying in the background or being clear, it's in the
foreground covering up the Web pages.

![](https://secure.gravatar.com/avatar/6bba8ab7d677f41b48978e80396d06dd033cd5bb4bc3bcd9967438772a84d7cf?
s=60&d=retro&r=g)

### 󠀁[Lots of Potential](https://wordpress.org/support/topic/lots-of-potential-8/)󠁿

 [Douglas Karr](https://profiles.wordpress.org/douglaskarr/) أبريل 19, 2018

There's so much potential with this plugin, I'd love to see it worked on further.
Specifically: * Remove all the hard-coded outputs and allow users to use CSS to 
control their own output. Perhaps even the ability to edit a template of some sort.*
Document the shortcode and add all the variables that are found in the widget. *
Allow the shortcode to access multiple regions instead of just one at a time.

![](https://secure.gravatar.com/avatar/63133602f8f477cedfd6cee6bb4a591918ee4c79fbdcc3f2db320e023bd17779?
s=60&d=retro&r=g)

### 󠀁[Excited to get this working](https://wordpress.org/support/topic/excited-to-get-this-working/)󠁿

 [jhschmitt](https://profiles.wordpress.org/jhschmitt/) فبراير 3, 2017 1 reply

Thanks for creating this plugin! I'm having trouble, though. When I click on Activate.
I get a message saying "This plugin does not have a valid header." Any idea why 
this is happening?

![](https://secure.gravatar.com/avatar/27fe918c32d62fdcfa33c0486f2d01e4b863b4c4a076cf98e75c736ad235ef28?
s=60&d=retro&r=g)

### 󠀁[Moderately functional](https://wordpress.org/support/topic/moderately-functional/)󠁿

 [ross95655](https://profiles.wordpress.org/ross95655/) يناير 10, 2017 2 replies

map doesn't work in Chrome or IE, just has a blank grey area instead of the map.
Would be nice to have the option to not display a map if it doesn't work right.

![](https://secure.gravatar.com/avatar/86eec4c60fea5e5ef2b08220e3a7bab278c0db6d6c9ade1feb726daf59b20fb1?
s=60&d=retro&r=g)

### 󠀁[Very Good Plugin](https://wordpress.org/support/topic/very-good-plugin-627/)󠁿

 [hadstorm](https://profiles.wordpress.org/hadstorm/) شتنبر 3, 2016 5 replies

I think this is a great plugin, and I appreciate all the hard work. The only issue
I have seen is caching. There was an alert that was extended; however, it was showing
the initial effective & expires times, instead of the updated times. I use w3tc 
and cleared the cache to resolve the issue. Is it possible to prevent this plugin
from caching? Also, is it possible to add the shortcode to a page where it will 
display all alerts in the body of the page, instead of the ajax style dropdown? 
Again, great work and very useful plugin. [ Link redacted, please do not post links
in reviews ]

![](https://secure.gravatar.com/avatar/ec91438b4cc4958c9459b8ef1a851f96a1438630495af4eafbcfb8e68c31e6bf?
s=60&d=retro&r=g)

### 󠀁[Inaccurate](https://wordpress.org/support/topic/inaccurate-2/)󠁿

 [miskywarn](https://profiles.wordpress.org/lagerclub/) شتنبر 3, 2016 1 reply

"The NWS Alerts plugin database tables are fully setup and the plugin is ready to
be used." Other than the fact that this plugin is a bit intrusive as far as the 
header design goes, it appears to be inaccurate as well. It claims to offer "National
Weather Service" alerts for any specified State but reads "There are currently no
active weather alerts", when in fact there were currently 12 active alerts for my
State at the time. My desire would be to find something that is actually up to date,
and in widget form, as opposed to taking over the header settings.

 [ Read all 11 reviews ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/)

## Contributors & Developers

“National Weather Service Alerts” is open source software. The following people 
have contributed to this plugin.

Contributors

 *   [ John Russell ](https://profiles.wordpress.org/laubsterboy/)

[Translate “National Weather Service Alerts” into your language.](https://translate.wordpress.org/projects/wp-plugins/national-weather-service-alerts)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/national-weather-service-alerts/),
check out the [SVN repository](https://plugins.svn.wordpress.org/national-weather-service-alerts/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/national-weather-service-alerts/)
by [RSS](https://plugins.trac.wordpress.org/log/national-weather-service-alerts/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.3.5

 * Fixed: The error retrieving weather alert data. This was caused by the feed mime
   type changing from rss+xml to atom+xml.

#### 1.3.4

 * Fixed: The 1.3.3 updates included some code incompatible with PHP <5.5 and this
   update fixes that.

#### 1.3.3

 * Fixed: The alerts map now requires a Google Maps JavaScript API key, so a new
   setting was added to the NWS Alerts settings page.

#### 1.3.2

 * Improvement: The wp_remote_get function is now used to request National Weather
   Service CAP data. This will use WordPress core HTTP functions and classes and
   improves server compatibility.

#### 1.3.1

 * Fixed: The National Weather Service Public Alerts require the use of https, so
   the feed urls needed to be updated.
 * Fixed: A bug that caused the NWS Alerts Bar to display even when there are no
   alerts. It will now automatically hide if there are no alerts and display when
   there are active alerts.

#### 1.3.0

 * Added Feature: Support for WordPress Multisite.
 * Added Feature: ‘nws_alerts_template_path’ filter, which can be used to specify
   alternative template paths.
 * Added Feature: ‘nws-alerts-page-builder-index-fix’ CSS class that is unused, 
   but intended to be added via page builder (Visual Composer, Beaver Builder, etc)
   to ensure that NWS Alerts display on top of surrounding content.
 * Added Feature: New display templates can be created and added by calling NWS_Alerts_Utils::
   register_display_template.
 * Added Feature: Alert entries can now be limited to a specified amount.
 * Improvement: The outputting of html has been moved to templates. Default plugin
   templates can be overridden by copying the template files into child theme and
   parent theme directories and then modified.
 * Improvement: Each Alert entry now includes the Target Area.
 * Removed: NWS_Alerts->get_output_headings object method.
 * Fixed: Alert effective and expiration times. They’re no longer adjusted to the
   WordPress gmt_offset for the site.
 * Fixed: Auto updating alerts via AJAX. This was broken in update 1.2.0.

#### 1.2.0

 * Added Feature: The location title can now be overridden with a custom name.
 * Added Feature: The alert entry details now include a link to the official NWS
   notice. Also, the effective and expiration date and times are included as part
   of each entries details.
 * Added Feature: NWS Alerts XML is now cached, when possible, to speed up page 
   loads.
 * Improvement: NWS Alerts XML is now fetched using CURL if server support is available.

#### 1.1.1

 * Fixed: Bug fix that prevented the alerts from auto-updating using AJAX.
 * Improvement: The plugin activation process is simplified and should work on all
   web hosts.
 * Improvement: The process to build database tables used for location look-up has
   been removed from the activation process and broken up into multiple automated
   parts to be compatible with all web hosts.

#### 1.1.0

 * Added: NWS Alerts settings page to add the NWS Alerts Bar.
 * Added: Bar display option, which displays in a horizontal layout and only displays
   when there are active alerts.
 * Improvement: Style and layout compatibility with themes. Also added additional
   classes to nws alerts markup to allow for more specific adjustments.

#### 1.0.1

 * Improvement: Typos
 * Change: Updated readme

#### 1.0.0

 * Initial release of the National Weather Service Alerts plugin.

## Meta

 *  Version **1.3.5**
 *  Last updated **9 سنوات ago**
 *  Active installations **100+**
 *  WordPress version ** 3.1 or higher **
 *  Tested up to **4.9.33**
 *  Language
 * [English (US)](https://wordpress.org/plugins/national-weather-service-alerts/)
 * Tags
 * [alert](https://ary.wordpress.org/plugins/tags/alert/)[National Weather Service](https://ary.wordpress.org/plugins/tags/national-weather-service/)
   [NWS](https://ary.wordpress.org/plugins/tags/nws/)
 *  [Advanced View](https://ary.wordpress.org/plugins/national-weather-service-alerts/advanced/)

## Ratings

 3.8 out of 5 stars.

 *  [  5 5-star reviews     ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/?filter=5)
 *  [  2 4-star reviews     ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/?filter=4)
 *  [  2 3-star reviews     ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/national-weather-service-alerts/reviews/)

## Contributors

 *   [ John Russell ](https://profiles.wordpress.org/laubsterboy/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/national-weather-service-alerts/)