WP Manifestindependent plugin directory
manifest / seo / simple-google-news-sitemap

Simple Google News Sitemap WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

A simple Google News sitemap is generated on-the-fly for articles that were published in the last two days. Output is saved in cache or as a transient for fast reading and displaying on the front end.

★ 15stars
1.1.1latest · 2 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/10up/simple-google-news-sitemap/archive/refs/heads/develop.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Simple Google News Sitemap

A simple Google News sitemap is generated on-the-fly for articles that were published in the last two days. Output is saved in cache or as a transient for fast reading and displaying on the front end.

Overview

  • By default, the plugin supports all post types (inc. custom ones). To filter out supported post types, the simple_google_news_sitemap_post_types hook can be used. The example is shown down below.

  • Cached sitemap data is set to expire after 2 days. Also, the data gets purged whenever a new post is published so that it can be included in the sitemap instantly.

  • No sitemap file is stored on disk. Data is served either from the cache or from the DB if caching is not enabled.

  • The plugin also pings the Google service whenever a new post is published. This behaviour can be toggled using the simple_google_news_sitemap_ping filter hook.

  • Utilise the simple_google_news_sitemap_start and simple_google_news_sitemap_end hooks to add data to the beginning and end of the sitemap, respectively.

  • Once the sitemap is generated, add it to the Google Search Console.

Requirements

Usage

  1. Install the plugin. You can upload and install the archived (zip) plugin via the WordPress dashboard (Plugins > Add New -> Upload Plugin) or manually inside of the wp-content/plugins directory, and activate on the Plugins dashboard.
  2. To generate the sitemap, simply visit <YOUR_BLOG_URL>/news-sitemap.xml.
  3. The sitemap will be stored in cache for faster access with an expiry set to 2 days.

Hook Usage

Example (for filtering supported post types):

add_filter( 'simple_google_news_sitemap_post_types', 'filter_post_types' );

function filter_post_types( array $post_types ) {
    // Return the filtered post types
    return $post_types;
}

Troubleshooting

If <YOUR_BLOG_URL>/news-sitemap.xml results in a 404, try saving permalinks and check the sitemap again.

Developers

Local Requirements

Initialise a wp-local-docker instance and inside the wp-content/plugins folder, run the following steps:

git clone git@gitlab.10up.com:10up-internal/simple-google-news-sitemap.git
cd simple-google-news-sitemap
composer install

Once done, go to the plugins page and activate the plugin.

If using Windows, it is recommended to use WSL2 as mentioned here.

Unit Tests

All commands listed below should be run from the root of the plugin folder in your local environment, using 10updocker v2.

10updocker shell
cd wp-content/plugins/simple-google-news-sitemap
composer setup-tests:local

Once the above steps are completed, run composer test for running the unit tests.

Frequently Asked Questions

Where do I report security bugs found in this plugin?

Please report security bugs found in the source code of the undefined plugin through the Patchstack Vulnerability Disclosure  Program. The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.

Support Level

Beta: This project is quite new and we're not sure what our ongoing support level for this will be. Bug reports, feature requests, questions, and pull requests are welcome. If you like this project please let us know, but be cautious using this in a Production environment!

Changelog

A complete listing of all notable changes to Simple Google News Sitemap are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a list of maintainers, contributors, and libraries used in this repository.

Like what you see?

Work with the 10up WordPress Practice at Fueled

Releases

5 releases.

Tag
Published
1.1.1 latest
Aug 20, 2024 2 years ago
Aug 31, 2023 3 years ago
Dec 7, 2022 3 years ago
Aug 19, 2022 4 years ago
Aug 17, 2022 4 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Simple Google News Sitemap 1.1.1 · audited by WP Registry

No security issues found.

Audited release
1.1.1
Findings
none
Worst severity
—
Content hash
edf8fd6280fef66bd7ae09aa…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.