Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

weglot_replace_div_id

This filter allow you to get the translated content after we have replace the <div id="weglot_here"></div> with the switcher

The filter receives the page HTML (a string) once every <div id="weglot_here"></div> has been replaced by the language switcher, and must return it.

add_filter( 'weglot_replace_div_id', 'custom_weglot_replace_div_id' );
function custom_weglot_replace_div_id( $html ) {
    // Edit the HTML here.
    return $html;
}

Last updated