Open ersinco opened 11 months ago
How do you exactly remove the category base slug from functions.php? Sounds like an hack, no surprise if does not work out of the box.
How do you exactly remove the category base slug from functions.php? Sounds like an hack, no surprise if does not work out of the box.
wordpress.org/plugins/no-category-base-wpml/
Actually I use this plugin in all my projects. I haven't had any problems so far.
You can reference this plugin.
Even if I change it with functions.php, the result remains the same.
Can you tell me a way to remove the /category slug?
The plugin is mentioning expressly WPML in the title, so it looks like it is not compatible with QTX. Maybe you may propose to extend this functionality to QTX on their side.
Apart from the plugin above, possible customization in functions.php should comply with QTX code, not vice versa, though pull requests within the scope of the plugin are generally welcome.
Personally I haven't had the need for this customization so far, so I don't have any ready to go suggestion...
Create a post category. Category name: test category Category url: /test-category
Site's Category Base Slug: /category
Category url: example.com/category/test-category
But when I remove the category base with the plugin or remove it from functions.php with code, the categories look like this.
example.com/test-category
This is exactly what I want, but when we translate the test category in a different language, say french.
English Category Slug: example.com/test-category
French Category Slug example.com/test-category-fr
When I change the site language to french, I can't get to the category.
When I restore the category base, the access to the category opens.
Initially, this is how the category works.
example.com/category/test-category-fr
I don't want to use the /category/ slug, at the url of the categories.
Expected behavior -------------
example.com/test-category-fr
Smooth working of URL translation.
Versions : 3.15.2