---
title: Filtrer la sortie du schéma local business
url: "https://www.seopress.org/fr/support/hooks/filtrer-la-sortie-du-schema-local-business/"
lang: fr-FR
updated: 2026-10-20
hook_name: seopress_schemas_local_business_html
required_version: 4.5
---

# Filtrer la sortie du schéma local business

- **Hook name:** `seopress_schemas_local_business_html`
- **Required version:** 4.5

```php
<?php
function sp_local_business_schema_html( $json ) {
	// $json is the encoded JSON-LD document (no <script> tag).
	$data = json_decode( $json, true );

	if ( is_array( $data ) ) {
		$data['priceRange'] = '$$';
		$json               = wp_json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
	}

	return $json;
}
add_filter( 'seopress_schemas_local_business_html', 'sp_local_business_schema_html' );
```

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


Modifiez le JSON-LD « Local Business » (entreprise locale) généré pour l’ensemble du site à partir des paramètres « Local Business ».

Le filtre reçoit la chaîne JSON-LD affichée dans l’élément script, et non l’élément script lui-même.
