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?
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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.