This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues where category pages are not connected with their translated equivalents, and hreflang tags are missing on paginated category pages. Additionally, the language switcher redirects to the root category page instead of the corresponding translated category page. Solution: We recommended inserting custom PHP code into the theme's functions.php file to address the URL issues with the language switcher on paginated category pages. Here is the code you should add:
For the hreflang tags issue, it was determined by our 2nd Tier Support that this is a default behavior and indexing paginated archive pages is not recommended. If you still require hreflang tags on paginated pages, it would require custom programming, which is outside our support scope. We recommend consulting with one of our certified partners: http://wpml.org/documentation/support/wpml-contractors/
If this solution does not resolve your issue or seems irrelevant, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, 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.
Symptoms:
The category pages do not have a URL hreflang and clicking on the Language Switcher redirects to the root category page (hidden link).
Questions:
Is it expected behavior that the category pages are not connected with their translated equivalents?
How can I solve the issue of category pages not having a URL hreflang and the Language Switcher redirecting to the root category page?
Here is the ticket and I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.
To guide you further, please adhere to these instructions:
1. View the Duplicator instructions video: hidden link
3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.
Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.
Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.
Hi,
I can create a staging website if you want and give you access to it. You will be able to change pretty much anything, but the premium plugins may not be fully active.
Does it work for you?
Please insert the custom PHP code below into your theme's functions.php file to fix this. I've added it on your staging site and it works now hidden link when switching to another language.
Upon review by our 2nd Tier Support, it appears that the hreflang issue you mentioned is a default behavior, where the hreflang tags may not be included in the source code for SEO purposes. It's also noted that indexing paginated archive pages is not recommended.
For example, you can see more details here: hidden link
If you still require this feature, it would necessitate custom programming, which falls outside the scope of our support services. We recommend contacting one of our certified partners from this list: http://wpml.org/documentation/support/wpml-contractors/
Hi,
Thank you for your answer.
I was wondering whether it was expected behavior mainly for SEO purposes so I'm good if that's the correct way of doing it.
Best,