XML News Sitemap Generator
Automatically generate a Google News-compatible XML sitemap for posts published in the last 48 hours with zero configuration.
Install in
XML News Sitemap Generator creates a real-time, Google News-compatible XML sitemap for WordPress posts in 1 click—with zero setup required out of the box and optional controls when you need them.
Key Features:
* Generates a Google News XML sitemap for posts published within the last 48 hours (UTC-accurate).
* Fully automated: works immediately after activation with zero configuration.
* Human-readable XSL stylesheet for browser viewing while serving pure XML to search engine bots.
* Automatic ISO 639-1 language code formatting (en, hi, zh-cn, etc.) for Google News compliance.
* Optional Settings page (Settings > News Sitemap) for custom Publication Name, Language override, Post Types, Category exclusions, Featured Images, and virtual robots.txt integration.
* Per-post “Exclude from News Sitemap” checkbox in the post editor.
* Smart cache invalidation with 1-click manual cache clear and zero direct database queries.
* Handles all WordPress permalink structures and multi-page pagination cleanly.
* Sends X-Robots-Tag: noindex, follow header so the XML file itself stays out of search results.
Ideal for news websites and blogs publishing time-sensitive content who want fast, reliable discovery in Google News, Google Search Console, and Bing Webmaster Tools.
Written by Joobi from the project's own listing. See the source page
8.0
- Tested and verified for WordPress 7.2 and PHP 8.6 compatibility.
- Fixed pagination redirect bug for Page 2+ news sitemaps on pretty permalinks.
- Fixed timezone mismatch by using UTC (
post_date_gmt) for the 48-hour window. - Normalized
<news:language>output to Google News ISO 639-1 format. - Added clean XSL stylesheet for human-readable sitemap preview in browsers.
- Added optional Settings > News Sitemap page (Publication Name, Language, Post Types, Category exclusions, Featured Images, robots.txt toggle, 1-click Cache Clear, Copy URL).
- Added per-post “Exclude from News Sitemap” editor metabox.
- Added
X-Robots-Tag: noindex, followheader on sitemap responses. - Replaced direct database transient queries with lightweight cache versioning for full Plugin Check compliance.
7.0
- Fixed critical bug where sitemap showed error on the first visit after cache expiry.
- Fixed issue where sitemap didn’t update correctly when posts became older than 48 hours or when new posts were published.
- Improved caching mechanism (default 30 minutes) for better stability and scalability.
2.0
- Fixed “headers already sent” bug affecting first sitemap load after publishing posts.
- Improved cache handling for real-time updates.
Follow this listing's changes (Atom feed)