Este es el foro de soporte técnico de WPML, el plugin multilingüe de WordPress.
Todas las personas pueden leerlo pero solo los clientes de WPML pueden ingresar comentarios. El equipo de WPML responde en los foros 6 días a la semana, 22 horas por día.
I don't know if you provide support in spanish, so I'll write in english. If you provide support in spanis, just let me know and I'll write in spanish.
I've a problem with the website enlace oculto. The problem is the language swticher provided by WPML is not working properly with a custom post type. The website is running with the last versions of WordPress and WPML.
The site is configured with 2 languages: spanish and galician. The main language is spanish.
This custom post type is configured in WPML to be translatable. If I create a post of this type in spanish and translate it to galician when I visit the spanish post and click in the language switcher I get a 404 not found error. The problem is the language switcher is not adding the language preffix in the URL and that is the reason because it fails.
For example: I have the spanish URL: enlace oculto
This post is translated to galician. The translated post has the URL: enlace oculto
(the url is very similar because many words in spanish don't neet to be translated to galician, so the only difference is between the word "aguas" and its translation "augas")
When I visit the spanish URL, if I hover the language switcher, this is the URL I see: enlace oculto
As you can see this URL lacks the gl language preffix and that is what is causing the 404 error.
Please, how can I solve this issue?
In case you need access to the site, just let me know.
If I remove this custom code then it works, but I want to preserve the "noticias" preffix in the URLs of the posts of this type. So, how could I modifiy the URL in the language switcher to fix it preserving this preffix?