Last active
January 3, 2025 20:30
-
-
Save amboutwe/63da5a51b1853ba7cbfbe4de55699cf6 to your computer and use it in GitHub Desktop.
By default, Yoast SEO does not add empty terms to the sitemap to prevent thin content issues. This code will allow empty terms to be added to the sitemap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Show all empty terms in Yoast SEO sitemaps | |
* Credit: Yoast team | |
* Last Tested: 03 Jan 2025 using Yoast SEO 24.1 on WordPress 6.7.1 | |
*/ | |
add_filter('wpseo_sitemap_exclude_empty_terms', '__return_false'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment