Goal
Show current NWS weather on the app home screen — one swipeable card per location, opened to the card nearest the user.
Before you start
mam-nws-weatheris active.- For the zero-config path, MAM GeoDirectory is active and your listings have coordinates. (Without GeoDirectory, a developer supplies locations via the
mam_nws_weather_for_home_screen_stackfilter.) - Locations must be inside the United States — the National Weather Service API only covers US territory.
Steps
- In the WordPress admin, go to Mobile App Mgr → App Settings and select the role whose home screen you’re editing.
- In the Home Screen Stack editor, choose Weather in the add-section dropdown and click Add. (The Weather option only appears while the plugin is active.)
- Drag the Weather section to the position you want and Save.
- Repeat for each role that should see weather.
- Optional: adjust the Weather panel settings — see Recipe: Configure the Weather settings. GeoDirectory apps work with the defaults: every listing gets a forecast card.
The first forecasts are fetched by the 15-minute scheduled job (Update Weather from the National Weather Service), so allow up to 15 minutes — or trigger it once from Mobile App Mgr → Scheduled Jobs.
What the app shows
- One card per location: location name, forecast period, conditions, temperature, and the NWS condition icon.
- Cards are ordered by distance from the user when the app shares its location, and the strip opens on the nearest location.
- If no weather data is available — plugin deactivated, no locations in scope, NWS outage — the element hides completely; there is no empty placeholder.
Troubleshooting
| Symptom | Check |
|---|---|
| Weather option missing from the section dropdown | Plugin active? The picker entry is registered by the plugin itself. |
| Element never appears in the app | Has the scheduled job run? Are listings inside the US with valid coordinates? Is a location source available (GeoDirectory active, or developer filter wired)? |
| Only some listings get weather | Check GeoDirectory Categories for Weather — blank means all listings; otherwise only listings in the named categories are included. |
Related articles
- Plugin: mam-nws-weather
- Recipe: Configure the Weather settings
- Hook:
mam_nws_weather_for_home_screen_stack
Metadata
| Field | Value |
|---|---|
| Article type | Recipe (Admin) |
| Plugin slug | mam-nws-weather |
| Applies to plugin version | 2.0+ |
| Category | Building Your App |
| Audience | WordPress admin |
| Estimated time | 5 minutes |
| Last verified | 2026-06-12 |
