Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needed to ensure that their location pages were not published in Spanish and that visitors would only see the English version, even if they manually added

/es/

to the URL.
Solution:
We checked the location posts and confirmed that the language switcher does not appear, indicating that the posts are available only in English. If the client wants to prevent access to the Spanish version even when

/es/

is manually added to the URL, we advised setting the post type to

"Translatable - only show translated items"

and not translating the posts. This will ensure that any attempt to access a Spanish URL will redirect to the English version automatically.

If this solution does not seem relevant to your issue, please open a new support ticket with us.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 2 replies, has 3 voices.

Last updated by Osama Mersal 1 year, 3 months ago.

Assisted by: Osama Mersal.

Author Posts
January 22, 2024 at 9:22 pm #15213590

jasonA-19

I need to reopen the topic found here: https://wpml.org/forums/topic/unpublish-spanish-location-pages/

The last response was a request to provide access to a staging environment. We are prepared to do that so please let me know the best way to get that over to you.

Thanks!

January 23, 2024 at 10:36 am #15215654

Alejandro
WPML Supporter since 02/2018

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello!

You can send the credentials in the related field i have enabled for your next reply.

I'll send the ticket to the same supporter that helped you before so you can continue the thread.

Regards.

January 24, 2024 at 10:17 am #15220892

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for the access details. I checked the locations, and they seem to work correctly. Please visit any location post, and you won't see the language switcher, which means it's available only in English.

So your visitors won't see any Spanish location, but if you manually add /es/ in the URL, you will see the same content with Spanish menus, but that needs to be done manually.

If you need your clients to be redirected to the English URL even if they typed the /es/ manually, please set the post type to "Translatable - only show translated items" and don't translate the posts.

In this case, the URL will be redirected automatically to English.

Best regards,
Osama

January 30, 2024 at 8:17 pm #15246459

jasonA-19

Thank you for your help! Setting the post type to "Translatable - only show translated items" was the correct solution for us.

Thanks!