Skip Navigation

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.

This topic contains 1 voice and has 0 replies.

>
Author Posts
February 15, 2024 at 12:11 am #15304625

gabrielS-38

Tell us what you are trying to do?
I am sorry to open a new ticket. We migrated from ACF to CMB2 because of its advantages.
We have a custom color for each category, wihch is the same for every language (the color), but because each translated category has a different id, the color only shows on the default lang. (english), forcing us to repeat the color value for each translation. We would like to avoid that. Just set the CMB2 color once on english. Is this possible?

Is there any documentation that you are following?
Nope

Is there a similar example that we can see?
Nope

What is the link to your site?
It is a local development site.

February 15, 2024 at 12:41 am #15304703

gabrielS-38

I resolved it by getting always the default language category id, like this:
$cat_english_id = apply_filters( 'wpml_object_id', $cat_term_id, 'category', FALSE, 'en');

Loving WPML!