Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 27 replies, has 1 voice.

Last updated by Justiin 6 hours, 38 minutes ago.

Assisted by: Andreas W..

Author Posts
August 22, 2025 at 6:25 am #17339422

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Testing:

Until now I was sadly not able to find a solution for translating widget display conditions when translating the content with the WPML Translation Editor.

The postmeta if the content is holding an ID for the original term and we can not force this ID to appear on the translation editor for translation, as it is part of a huge settings array and setting this field to "Translate" will include all those settings inside the translation editor.

Workaround:

Make sure that at WPML > Settings > Custom Field Translation > Show system fields the fields "_fl_builder_draft" and "_fl_builder_date" are set to "None".

You will be able to set the display conditions manully inside Beaver Builder in each language.

Downside: If you translate the content with the WPML Translation Editor the setting will be lost.

I tried solving this direlcty inside PHP in Beaver Themer, but could saldly not find a quick working solution for the issue.

Escalation:

I am escalating this issue to our compatilbity team for further revision and will reach out to you again once I received their feedback.

August 23, 2025 at 9:57 am #17341870

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

While testing I realized that Beaver Themers' logic seems not to work as expected when using one template for all post category archives and then setting a widget's display condition to a specific category.

Example:
- Create a layout for all post archives
- Add a widget and determine that this widget should only appear on one category

Result:
The display condition is not respected, and widgets will appear on all categories while testing only with Beaver Theme, Beaver Themer, and Beaver Builder.

Please take a look at my test site:
hidden link

Workaround:
Create one template for each post category.

I would suggest you consult this first with Beaver Builder, as this issue should be solved before we take any further steps from our end.

Best regards
Andreas

August 25, 2025 at 8:50 am #17344189

Justiin

I will contact Beaver Builder again! Ill let you know!

August 26, 2025 at 5:18 am #17346594

Justiin

"Hi Justin,

I viewed the post on that topic, followed the steps they provided, and I am not able to replicate the issue. When I create an archive layout assign it to Post Category Archives, and add a module that should only display on a specific category using this conditional:

hidden link

The module displays on the "Danny's Category" archive, but not for any other category archive. This is the correct behavior and so, would it be possible for you to reply to WPML and have them provide screenshots of the conditional logic they're using, please.

Danny Holt
hello@wpbeaverbuilder.com"

August 26, 2025 at 5:13 pm #17349158

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Can you please provide me with another example and explain exactly what you are trying to achieve?

Your earlier example:
hidden link

The Translation seems to look correct:
hidden link

Please note that I installed the latest versions of our plugins on your staging site.

August 27, 2025 at 8:58 am #17350861

Justiin

Hi,

I’m not sure why this has to be so complicated. As I mentioned, I already corrected the issue manually.

The real problem is that whenever I update the translation of a page, even if it’s just one word, the conditional logic settings reset to blank. That’s the issue I need resolved.

Can you please look into why this is happening?

My last response was the response Beaver Builder gave me. They asked: "This is the correct behavior and so, would it be possible for you to reply to WPML and have them provide screenshots of the conditional logic they're using, please." Can you provide?

August 27, 2025 at 11:31 pm #17353052

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies for the confusion; it looks like I did not set the condition properly and therefore thought there was a bug already on Beaver Builder.

I was now able to reproduce and confirm the issue on a new test site and have escalated the issue to our compatilbity team for further revision.

Once I receive feedback from the team, I will reach out to you again.

August 28, 2025 at 2:04 pm #17355611

Justiin

That sounds great! Thanks, keep me posted!

August 28, 2025 at 2:05 pm #17355613

Justiin

Danny replied:

Hi Justin,

I received a response from one of our developers regarding your issue. They mentioned that we are using the has_term( $id, $taxonomy, $post ); function to check the category. Could you share this with WPML and ask if there’s a way to check the category using the original category ID stored in the data?

August 28, 2025 at 2:18 pm #17355629

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I have not yet received feedback from the compatibility team on this matter, but you can let the team know that, usually, they would need to use this hook:
https://wpml.org/wpml-hook/wpml_object_id/

Example:

$original_term_id = 1; // This is the term ID stored in postmeta or builder logic
$taxonomy = 'category'; // Your taxonomy
$post_id = get_the_ID(); // Or pass a specific post ID

// Get the translated term ID for the current language
$translated_term_id = apply_filters( 'wpml_object_id', $original_term_id, $taxonomy, true );

// Now check if the post has the translated term
if ( has_term( $translated_term_id, $taxonomy, $post_id ) ) {
    // Do something — e.g. show widget, apply logic
}
August 29, 2025 at 3:21 am #17356623

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

To solve the issue, please add the following workaround to a Code Snippet Plugin or the functions.php file of a Child Theme:

// WPML Workaround for compsupp-8120 
add_action( 'init', function () {
	if ( ! class_exists( 'BB_Logic_Rules' ) ) {
		return;
	}

	// Override: wordpress/archive-term 
	BB_Logic_Rules::register( array(
		'wordpress/archive-term' => function( $rule ) {
			// Translate the term ID
			if ( isset( $rule->taxonomy, $rule->term ) ) {
				$lang = apply_filters( 'wpml_current_language', null );
				$rule->term = apply_filters( 'wpml_object_id', $rule->term, $rule->taxonomy, true, $lang );
			}
      // Keep the original logic from the plugin
			if ( 'category' === $rule->taxonomy ) {
				$has = is_category( $rule->term );
			} elseif ( 'post_tag' === $rule->taxonomy ) {
				$has = is_tag( $rule->term );
			} else {
				$has = is_tax( $rule->taxonomy, $rule->term );
			}
			return ( 'equals' === $rule->operator ) ? $has : ! $has;
		},
	) );

}, 1 );
August 30, 2025 at 1:38 am #17358959

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Note, that I updated my earlier comment with a proper workaround from our compatilbity team.

September 1, 2025 at 8:23 am #17361658

Justiin

The code you send last response did the tricky, will you guys implement this soon into the plugin?