> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/cms/wordpress/helpers-functions-1/weglot_exclude_blocks.md).

# weglot\_exclude\_blocks

This filter allow you to modifiy the array of exclude blocks.

The filter receives the array of CSS selectors whose content is never translated, and must return it. Weglot adds a `data-wg-notranslate` attribute to every matching element.

```php
add_filter( 'weglot_exclude_blocks', 'custom_weglot_exclude_blocks' );
function custom_weglot_exclude_blocks( $blocks ) {
    $blocks[] = '.customer-reviews';
    return $blocks;
}
```

{% hint style="info" %}
The exclusions are ignored as soon as `weglot_parser_whitelist` returns a non-empty list: the page then only translates the whitelisted blocks.
{% endhint %}
