This thread is resolved. Here is a description of the problem and solution.
Problem:
The client needed a way to set their Spanish translated pages to 'noindex, nofollow' without unpublishing them.
Solution:
We recommended two approaches:
1. Using Yoast SEO to set 'noindex, nofollow' on a page-by-page basis:
- Edit the page in the main language.
- Switch to the secondary language using the admin top bar.
- In the Yoast SEO section, disable the options for indexing.
Yoast SEO settings screenshot
Note: This action will switch from the advanced translation editor to the WordPress editor for that translation.
2. Adding code to the theme's header file to apply 'noindex' globally to all pages in Spanish:
<?php if(ICL_LANGUAGE_CODE == 'es'): ?> <meta name="robots" content="noindex"> <?php endif; ?>
The client should replace 'es' with the appropriate language code if needed.
If the provided solution does not apply or is outdated, or if further assistance is needed, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that the latest versions of themes and plugins are installed. If the issue persists, please open a new support ticket at WPML Support Forum.
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.
This topic contains 1 reply, has 2 voices.
Last updated by 8 months, 2 weeks ago.
Assisted by: Mateus Getulio.