---
title: Filtrer les termes dans les titres du plan de site HTML
url: "https://www.seopress.org/fr/support/hooks/filtrer-les-termes-dans-les-titres-du-plan-de-site-html/"
lang: fr-FR
updated: 2025-06-17
hook_name: seopress_sitemaps_html_display_terms_only / seopress_sitemaps_html_term_name / seopress_sitemaps_html_terms_output
required_version: 8.8
---

# Filtrer les termes dans les titres du plan de site HTML

- **Hook name:** `seopress_sitemaps_html_display_terms_only / seopress_sitemaps_html_term_name / seopress_sitemaps_html_terms_output`
- **Required version:** 8.8

```php
add_filter('seopress_sitemaps_html_display_terms_only', 'sp_sitemaps_html_display_terms_only', 10, 2);
function sp_sitemaps_html_display_terms_only($display_terms_only, $cpt_key) {
	// Display terms only for products
	if ($cpt_key == 'product') {
		return true;
	}

    return $display_terms_only;
}

add_filter('seopress_sitemaps_html_term_name', 'sp_sitemaps_html_term_name', 10, 2);
function sp_sitemaps_html_term_name($term_name, $term) {
	// Modify term name for products
	if ($term->taxonomy == 'product_cat') {
		return 'Product Category: ' . $term_name;
	}
    return $term_name;
}

add_filter('seopress_sitemaps_html_terms_output', 'sp_sitemaps_html_terms_output', 10, 3);
function sp_sitemaps_html_terms_output($html, $terms, $cpt_key) {
	// Modify the terms HTML output
	if ($cpt_key == 'product') {
		return 'Product Terms: ' . $html;
	}
    return $html;
}
```

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



