GeoDirectory listings, categories and tags are ordinary WordPress post types and taxonomies, so Yoast SEO puts them in its XML sitemap (sitemap_index.xml) the same way it does posts and pages. Whether each post type and taxonomy is included is controlled in Yoast’s own settings.
Location pages in the sitemap
Location pages, such as a city page or a post type filtered by a city, come from the Location Manager add-on, and Location Manager adds them to the Yoast sitemap. When Yoast SEO is active, the Location Manager settings have a Sitemaps section with these options:
- Hide Locations removes the location pages.
- Hide Post Types removes post type pages that are filtered by a location.
- Hide Categories removes category pages that are filtered by a location.
- Hide Tags removes tag pages that are filtered by a location. This one is on by default.
- Neighbourhoods adds neighbourhood pages, which are left out unless you turn it on.
The same section shows options for Rank Math, or for the WordPress core sitemap, when you use those instead. See Settings overview for Locations > Settings for the other Location Manager settings.
The sitemap shows an error or a blank page
If the sitemap shows “error on line 2 at column 1: Extra content at the end of the document”, something printed text before the XML started. This is usually a PHP notice or warning shown on screen, or stray output from a plugin or theme. View the page source of the sitemap and the message at the top will often tell you which plugin it came from.
- Update GeoDirectory, Location Manager and Yoast SEO to their latest versions.
- Stop PHP messages being printed on the page by adding the line below to
wp-config.php. If you need them, they can still go to the debug log. - Clear your caching plugin and any server cache, then go to Settings > Permalinks and click Save Changes once.
- Load the sitemap again. If the error is still there, deactivate other plugins one at a time to find the one adding output.
define( 'WP_DEBUG_DISPLAY', false );