- ステータス
- 開発者により解決済み
- 関連するプラグイン/テーマ
- All in One SEO
問題の概要
All in One SEOとWPMLを使用し、(WPML → 言語ページにある)多言語機能のためにIDを調整するオプションを有効にしている場合、category-sitemap.xmlファイルにデフォルト言語の重複したカテゴリが含まれます。セカンダリ言語のカテゴリは表示されません。
回避策
All in One SEOのコードベースでの恒久的な修正が必須ですが、それまでの間、以下の手順に従ってこの問題の回避策を使用できます。
- wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Query.phpファイルを開きます。
- termsメソッドを検索します(227行目付近)。
- メソッドの先頭に以下の回避策を追加します。
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; } - category-sitemap.xmlファイル(yourwebsite.com/category-sitemap.xml)を開き、ページを更新します。
次のステップ
すでにAIOSEOチームにこの問題を報告しており、迅速に解決される見込みです。進捗状況を確認したい場合は、AIOSEOのサポートフォーラムから連絡できます。