This WordPress plugin adds an XML sitemap for PDFs. It adds this XML sitemap to the sitemap_index.xml
that Yoast SEO generates.
It has no settings.
- Upload the files to the
/wp-content/plugins/pdf-sitemap/
directory or install through WordPress directly. - Activate the 'XML Sitemap for PDFs for Yoast SEO' plugin through the 'Plugins' menu in WordPress
- Go to your site's
sitemap_index.xml
file and click on from there.
The plugin only scans folders with numeric names, so it won't add files that have been uploaded through forms.
Yes, the plugin scans the uploads folder once per day and saves that data to a transient. When you upload a new PDF file that cache is cleared automatically.
This plugin has not been tested on multisite.
Yes, it does. It has the following filters:
Filter | Description |
---|---|
JoostBlog\WP\pdf-sitemap\filetypes |
Allows filtering which filetypes we're adding to the XML sitemap. Just pdf by default. |
JoostBlog\WP\pdf-sitemap\cache_time |
Allows filtering how long the plugin caches the scanned PDFs for. Value needs to be in seconds. Defaults to one day. Note: setting to 0 will mean cache indefinitely, not disable it. |
JoostBlog\WP\pdf-sitemap\pdfs |
Allows filtering the PDFs being output. |
- Fixed a potential notice for an unset variable.
- Renamed some filters for consistency.
- First version.