Hello,
my theme (Citadela-Ait-themes.club) depents on the function get_option('siteurl') to read the site url and validate/verify the install through an ajax call to their server and a response.
I have used the wpml option to have different domains per language
Default/registered url --> hidden link
Italian version --> hidden link
English version --> hidden link
It seems that the above function returns the language domain url when someone visits the other language versions e.g Italian url(hidden link) instead of the default language wordpress site url (hidden link) which is registered for the theme and when this happens the theme brakes because karag.it is not registered
I checked it by using <?php echo get_option('siteurl') ?> in functions.php and the url that prints is the language domain url My client wants to keep the different domains per language Any ideas how can I deal with this problem?
That is the appropriate behavior for the separate domain mode. The whole reason for the separate domain is to make sure WP thinks of it as a separate domain and in the other language points to the domain that you set in WPML > Languages.
Now what I have in mind to replace the code with:
get_option( 'home' )
See if it helps?
If not you will need to use the WPML hook to determine the default language URL by determining what is the default language and get the equivalent URL of that language:
Hi Christofer,
thanks for clarifying this. If I only realized this earlier it would have save me days of troubleshooting
I already use the get_option('home') as a workaround and I have suggested this solution to the theme developers as to be a permanent change in their code I hope they will be conviced to do it so I dont have to manually do it in every theme update
Thank you
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.