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

Page builders

Keep Weglot out of page builder editors and previews

Page builders edit and preview content in the original language, from the front end. Weglot must stay out of those requests: the builder would otherwise display translated markup, and could save it back as source content.

Weglot recognises them from the query string. When one of the parameters below is present in the URL with a non-empty value, Weglot does not register its front-end hooks at all — the page is served untranslated and no language switcher is injected.

These parameters are excluded by default, so those builders need no configuration:

Parameter
Page builder
Excluded since

elementor-preview

Elementor

earlier versions

_breakdance_doing_ajax

Breakdance

earlier versions

in-front-editor

Brizy

6.3

is-editor-iframe

Brizy

6.3

brizy_media

Brizy

6.3

Values PHP treats as falsy — an empty string, or 0 — do not trigger the exclusion.

weglot_page_builder_query_params

Use this filter to support a builder that is not listed, or to drop an entry that conflicts with another plugin.

Available since Weglot 6.3. On earlier versions the list is hard-coded and cannot be extended.

Argument
Type
Description

$query_params

array

Query parameter names that disable Weglot when present

Add a page builder

Append the query parameter the builder sets while editing:

<?php

add_filter( 'weglot_page_builder_query_params', 'custom_weglot_page_builder_params' );
function custom_weglot_page_builder_params( $query_params ) {
    $query_params[] = 'ct_builder'; // Oxygen.
    return $query_params;
}

Several at once:

Remove a parameter

in-front-editor and is-editor-iframe are not prefixed by their plugin. If another plugin uses one of those names on public URLs, translation would be skipped there. Remove the entry rather than patching Weglot:

Finding the right parameter

Open a page in the builder's editor and look at the URL of the editing frame. The parameter the builder adds there — often the one carrying the post ID, or an ajax/preview flag — is the one to declare. Parameters are matched exactly, and the filter must return an array of strings.

To disable Weglot whenever a builder is loaded, and not only inside its editor, see Deactivate Weglot on Elementor.