---
title: Filtre una matriz de categoría de producto única usando %% wc_single_cat %%
url: "https://www.seopress.org/es/soporte/hooks/filtre-una-matriz-de-categoria-de-producto-unica-usando-wc_single_cat/"
lang: es
updated: 2021-09-30
hook_name: seopress_titles_product_cat
required_version: 3.7.2
---

# Filtre una matriz de categoría de producto única usando %% wc_single_cat %%

- **Hook name:** `seopress_titles_product_cat`
- **Required version:** 3.7.2

```php
add_filter('seopress_titles_product_cat', 'sp_titles_product_cat');
function sp_titles_product_cat($cat) {
	//$cat = array of single product category, key = term ID, value = term name
	unset($cat[20]); //remove category with term ID "20",
	return $cat;
}
```

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



