multiple-domain
multiple-domain copied to clipboard
WPML compatibility?
Describe the bug Menu links are not changed, they are still showing the default language links instead of the newly added domain.
To Reproduce Steps to reproduce the behaviour:
- Have WPML installed
- Use different domains for each language
- Activate Plugin
- Add another Domain
Expected behaviour Links in the Main Navigation Menu to change according to the new domain added.
Screenshots Get back to me if needed.
Environment:
- PHP version: 7.3
- WordPress version: 5.3.2
- Plugin version: 1.0.5
Additional context I am using WPML and have a different domain for each language:
- domain.uk
- domain.de
- domain.bg and so on.
It would be great if I could use the permalinks with the new domain:
- domainIjustAddedWithThisPlugin.com/?p=123456
this is only possible with the default language, not other domains set in WPML
Hey @jayhybrid
This plugin is not compatible with WPML nor any other plugin that relies on domain changes to work. This is a known issue for a while but there is no fix on the way. You can follow some discussions in here.
Yet, in case you simply need to have 1 domain per language, WPML handles that for you alone. There is no need to use Multiple Domain plugin. You just have to set it to use language in domains.
If you want more than one domain per language, this is an old tutorial from WPML that might work for you.
Hey @straube
Thanks for the info. The discussion you sent me seems to be quite promising, am I missing something here? Could this not be tested [and applied]?
`// Show alias at Homepage as well function filter_wpml_active_languages( $home_url) { if (class_exists('MultipleDomain')) { $multipleDomain = MultipleDomain::instance(); } return $multipleDomain->fixUrl($home_url); };
// add the filter add_filter( 'wpml_url_converter_get_abs_home', 'filter_wpml_active_languages', 10 );`
This may not be going global according to WPML but seems to be a quick fix until then.