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
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Noman 9 months, 1 week ago.

Assisted by: Noman.

Author Posts
September 20, 2024 at 9:46 pm #16204162

tylerL-3

Background of the issue:
Here is a video describing it: hidden link

I need the logo in the header to link to whatever the language homepage is. So on an en-ca site it will link to the homepage in en-ca. I also need the code for the dynamic linking for the contact us button. When on hidden link it goes to hidden link. I have tried everything and tried functions.php and still haven’t found this common use. https://wpml.org/wpml-hook/wpml_object_id/

Symptoms:
I can’t find the info on how to create dynamic URLs based on the active language in any docs.

Questions:
What is the code for a dynamic URL to use throughout the site?
How can I make the logo in the header link to the homepage in the active language?
How can I create a dynamic link for the contact us button based on the active language?

September 22, 2024 at 11:01 am #16205889

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Thank you for sharing the video explaining the issue. I can see that the logo and 'Contact Us' button links are not functioning in the secondary languages.

To take a closer look at this issue, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

Your next answer will be private, meaning only you and I can access it.

=== Please backup your database and website ===

✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.

Thank you

The topic ‘[Closed] Dynamic link url based on active language’ is closed to new replies.