---
title: Filter Custom Post Type Name in HTML sitemap
url: "https://www.seopress.org/support/hooks/filter-custom-post-type-name-in-html-sitemap/"
lang: en-US
updated: 2021-10-08
hook_name: seopress_sitemaps_html_cpt_name
required_version: 5.2
---

# Filter Custom Post Type Name in HTML sitemap

- **Hook name:** `seopress_sitemaps_html_cpt_name`
- **Required version:** 5.2

```php
function sp_sitemaps_html_cpt_name($cpt_name, $cpt_key) {
    if ($cpt_key === 'post') {
        $cpt_name = __('Blog', 'your-text-domain');
    }
    return $cpt_name;
}
add_filter('seopress_sitemaps_html_cpt_name', 'sp_sitemaps_html_cpt_name', 10, 2);
```

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



