Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Purpose
This filter can be used to filter the terms that are excluded from the sitemap.
Arguments (1)
- $ids (array) – The IDs of the excluded terms.
- $type (string) – The type of sitemap.
Example code snippet
The code snippet below is just an example of how this filter can be used. In the example below, the term with ID 412 is excluded from the XML Sitemap.
add_filter( 'aioseo_sitemap_exclude_terms', 'aioseo_sitemap_filter_excluded_terms', 10, 2 );
function aioseo_sitemap_filter_excluded_terms( $ids, $type ) {
if ( 'general' === $type ) {
$ids[] = 412;
}
return $ids;
}