I use the Polylang plugin to translate a website´s content but I am experiencing the issue of the source language post losing its category when a translation is updated in WordPress. Today I will explain how I solve this issue.
The Polylang plugin is a popular multilingual plugin for WordPress. It enables you to create a multilingual website by allowing you to translate your website’s content into multiple languages.
In this post I explain how to translate a website for free easily. Also, check this article if you would like to learn how to update internal links to their language when you translate your site.
Here are some key features and uses of the Polylang plugin:
Multilingual content management:
Polylang allows you to create and manage content in multiple languages within a single WordPress installation. You can create translations for posts, pages, custom post types, categories, tags, and other taxonomies.
Language switcher:
The plugin provides various language switcher options that allow visitors to switch between different language versions of your website, as you can see in the image below:
![13. Polylang makes lose the source language post lose its category when you update the translation_language switcher](http://purrfectmarketingstrategies.com/wp-content/uploads/2023/06/13.-Polylang-makes-lose-the-source-language-post-lose-its-category-when-you-update-the-translation_language-switcher-1024x211.png)
Language settings and configuration:
Polylang provides a user-friendly interface to manage language settings. You can add languages, set a default language, and configure language-specific settings such as slugs, permalinks, and more.
Translation management:
With Polylang, you can easily create and manage translations for your content. The plugin offers a translation interface where you can enter translated content for each language. You can also synchronise content between translations.
How to fix the issue of Polylang making the source language post lose its category when a translation is updated.
When I make any type of edit in a translated page, the source language post immediately loses its categories.
For example, it goes from:
- https://example.com/recipes/how-to-cook-paella
to
- https://example.com/how-to-cook-paella
In some cases it goes to:
- https://example.com/uncategorized/how-to-cook-paella
In the first scenario, the URL does not redirect automatically, so this means that the post ends up being a broken link.
In the second scenario, it is not a 404, but still loses their association to the right category.
The only way I have found to fix this is by immediately checking the categories of the source language as soon as I do any edits on its translation.
I hope this post helped you fix the issue when Polylang makes the source language post lose its category when a translation is updated.
If you are creating content for your site and want to find the best strategies and tactics for your SEO goals, check out these posts:
What is programmatic SEO and how to use it to boost your marketing efforts.
How to use Chat GTP to write marketing content and AI prompt examples.
How to Create a Content Marketing Strategy
How to do SEO and Content for B2B vs B2C Selling Propositions: A Comprehensive Guide.
Stay curious and pounce back here for more marketing magic, my purr-fect pals!
Missing me already, dear human? You can find me on X and Facebook.
Moxie