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.

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: Asia/Yerevan (GMT+04:00)

This topic contains 2 replies, has 0 voices.

Last updated by Christopher Amirian 3 months, 2 weeks ago.

Assisted by: Christopher Amirian.

Author Posts
February 13, 2025 at 6:27 am #16699940

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the explanation, I consulted with our compatibility team and they mentioned that the feature you talk about defeats the very nature of troubleshooting that we need to do to see why the Woodmart header builder image icon link is not translated via string translation.

If there is no way to see the files of the theme we can not find what might be the problem cause.

Hope you understand the point that we have here.

Thanks.

February 16, 2025 at 11:00 am #16710420

webs

Hello, I hope you are doing well
The template support, after following up with me, finally gave me the answer that the Woodmart template is generally not compatible with this, but the following code may be able to solve this problem in an unconventional way.
I wanted to ask you if this answer is logical?

if ( defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE == 'en' ) { $logo_url = 'url'; $logo = '' . get_bloginfo( 'name' ) . ''; }
By the way, I also applied the code but I did not get a response

February 17, 2025 at 11:13 am #16713518

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the information. I am not familiar with the context of where that code needs to be added, but the code used there is deprecated and you need to use something like this:

    $current_language = apply_filters('wpml_current_language', null);
    
    if ($current_language === 'en') {
        $logo_url = 'url';
        $logo = '<h1>' . get_bloginfo('name') . '</h1>';
    }

Now I am not sure how it should be used as I am not sure where that code is added in the first place.

If it helps, here is the link to the hook I mentioned above:

https://wpml.org/wpml-hook/wpml_current_language/

Thanks.

February 17, 2025 at 1:16 pm #16714407

webs

Thank you. We have been told to place it in the following path:
themes\woodmart\header-elements\logo.php

Above this line: woodmart_lazy_loading_init();

Should we also add the code you sent in this path?

February 17, 2025 at 1:42 pm #16714662

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

You can replace the suggested code with the one I suggested and see what is the result. Unfortunately, we are unable to do proper troubleshooting if we do not have access to the theme files and a way to test the result.

The topic ‘[Closed] Tips on translating images and displaying headers differently’ is closed to new replies.