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 3 replies, has 2 voices.

Last updated by przemyslawD-3 1 week, 5 days ago.

Assigned support staff: Bruno.

Author Posts
October 8, 2019 at 9:39 am #4713665

przemyslawD-3

Hi,

I have problem with logo url - in each language version it's always redirect to default language.

I found this solution:
https://wpml.org/forums/topic/its-always-changing-to-default-language-after-clicking-on-header-logo-image/

But already I use "Different languages in directories" url format and it's doesn't work (PrtScr).

October 8, 2019 at 11:47 pm #4718419

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Thank you for contacting us. This could be related to how the logo link is being added.

I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Note:

*** Please let me know exactly what steps should I follow to see the problem.

*** Please, can I install the Duplicator plugin (or All in One Migration) to make a copy of your site and install it on my test environment? This will help me debug the problem.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

October 9, 2019 at 8:46 pm #4725555

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. The problem is happening because your theme is using the "get_site_url" function to add the link to the logo.

The WPML by default does not add filters to this function, so all languages are pointing to the default language. From what I saw from your theme, inside the templates/section-nav.php file for all logo links your theme is using:

<?php echo get_site_url(); ?>

You should use the "get_home_url()" function instead:

<?php echo get_home_url(); ?>

In order to make the change, I copied this file to your child-theme, so you can update the parent theme as needed without losing the changes. Now your site is working properly.

Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.

Thank you.

October 10, 2019 at 11:41 am #4729847

przemyslawD-3

My issue is resolved now. Thank you!