WPML
상태
개발자가 해결함
관련 플러그인/테마
All in One SEO

문제 개요

WPML언어 페이지에 있는 다국어 기능을 위해 ID 조정 옵션을 활성화한 상태로 All in One SEO와 WPML을 사용하면 category-sitemap.xml 파일에 기본 언어로 된 카테고리가 중복되어 나타납니다. 보조 언어의 카테고리는 표시되지 않습니다.

임시 해결 방법

All in One SEO의 코드베이스에서 영구적인 수정이 필요하지만, 그동안 다음 단계에 따라 이 문제에 대한 임시 해결 방법을 사용할 수 있습니다:


  1. wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Query.php 파일을 여세요.

  2. terms 메서드를 검색하세요(227번째 줄 근처).

  3. 메서드의 시작 부분에 다음 임시 해결 방법을 추가하세요:
    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;
    }


  4. category-sitemap.xml 파일(yourwebsite.com/category-sitemap.xml)을 열고 페이지를 새로 고침하세요.

다음 단계

저희는 이미 AIOSEO 팀에 이 문제에 대해 알렸으며, 신속하게 해결될 것으로 확신합니다. 진행 상황을 확인하려면 해당 팀의 지원 포럼을 통해 문의할 수 있습니다.

알려진 모든 문제 →