> 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_replace_weglot_menu.md).

# weglot\_replace\_weglot\_menu

This filter allow to modify the content before we add the switcher(s)

The filter receives the page HTML (a string) before Weglot adds its switcher(s), and must return it.

```php
add_filter( 'weglot_replace_weglot_menu', 'custom_weglot_replace_weglot_menu' );
function custom_weglot_replace_weglot_menu( $html ) {
    // Edit the HTML here.
    return $html;
}
```
