Resolved by author
Overview of the issue
When using All in One SEO and WPML with the Adjust IDs for multilingual functionality option enabled (found on the WPML → Languages page), the category-sitemap.xml file will have duplicated categories in the default language. Categories from secondary languages are not displayed.
Workaround
A permenent fix is required in All in One SEO’s codebase, but you can use a workaround for this issue in the meantime by following these steps:
- Open the wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Query.php file
- Search for the terms method (around line 227)
- Add the following workaround to the beginning of the method:
public function terms( $taxonomy, $additionalArgs = [] ) { //WPML workaround if (class_exists('SitePress')) { global $sitepress_settings; // Before building the sitemap and as we are on front-end make sure links aren't translated. // The setting should not be updated in DB. $sitepress_settings['auto_adjust_ids'] = 0; }
- Open the category-sitemap.xml file (yourwebsite.com/category-sitemap.xml) and refresh the page
Next steps to resolve this issue
We’ve already let the AIOSEO team know about this issue, and we’re sure they will get it resolved quickly. If you want to check in on progress, you can reach them via their support forum.
its not working- i dont know whay AIOSEO is not working – whats problem with plugin.
Hello there,
If this is not working in your site, please open a ticket in our support forum so we can investigate it better.
Thank you for your help.