---
title: Filter XML sitemap single taxonomy
url: "https://www.seopress.org/support/hooks/filter-xml-sitemap-single-taxonomy/"
lang: en-US
updated: 2021-09-30
hook_name: seopress_sitemaps_xml_single_term
required_version: 3.7.5
---

# Filter XML sitemap single taxonomy

- **Hook name:** `seopress_sitemaps_xml_single_term`
- **Required version:** 3.7.5

```php
add_filter('seopress_sitemaps_xml_single_term', 'sp_sitemaps_xml_single_term');
function sp_sitemaps_xml_single_term($xml) {
	//complete XML single taxonomy sitemap
	//do your stuff here
	return $xml;	
}
```

Source: [https://gist.github.com/wp-seopress/f8821b63513390ea6a23906c6db65a3d](https://gist.github.com/wp-seopress/f8821b63513390ea6a23906c6db65a3d)


**This snippet must be added to a [must-use plugin](https://wordpress.org/support/article/must-use-plugins/) to make it work.**
