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?
I've just solved it adding the preffix "noticias" in the permalink configuration and removing the custom code.
Gestionar el consentimiento de cookies
Utilizamos cookies para optimizar nuestro sitio web y nuestros servicios. Su consentimiento nos permite procesar datos como el comportamiento de navegación. No dar su consentimiento puede afectar a algunas funciones.
Funcional
Siempre activo
Necesario para que nuestro sitio web funcione y se comunique correctamente.
Preferencias
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Estadísticas
Las utilizamos para analizar las estadísticas de nuestro sitio. La información recopilada es totalmente anónima.El almacenamiento o acceso técnico que se utiliza exclusivamente con fines estadísticos anónimos. Sin una citación, el cumplimiento voluntario por parte de su proveedor de servicios de Internet, u otros registros de terceros, la información almacenada o recuperada solo para este propósito generalmente no puede usarse para identificarlo.
Marketing
Estas cookies rastrean su navegación para proporcionar anuncios relevantes para usted.