ผู้ใช้นี้ไม่มีหัวข้อที่ชื่นชอบ.
หัวข้อฟอรัมที่ชื่นชอบ
หัวข้อฟอรัมที่สร้าง
| สถานะ | 
					หัวข้อ
					 | 
				ผู้สนับสนุน | เสียง | โพสต์ | ความใหม่ | 
|---|---|---|---|---|---|
| 
		
        Alternative languages (hreflangs) in Yoast SEO sitemaps show for hidden/disabled languages.
		
		
		
         
			
            เริ่มโดย: anna-stanczykT
			
			
				
                ใน: English Support
				
						 Problem: Solution: /plugins/wp-seo-multilingual/classes/Shared/Sitemap/BaseAlternateLangHooks.php . addAlternateLangData  function around line 59. list( $elements, $getPermalink, $isIndexable ) = $this->getEntryHelpers( $type, $obj ); , insert the following code: // Exclude hidden language posts
global $sitepress;
$hidden_languages = $sitepress->get_setting( 'hidden_languages', [] );
if ( $elements && !empty($hidden_languages) ) {
	foreach ( $elements as $lang => $element ) {
		if ( in_array( $lang, $hidden_languages ) ) {
			unset( $elements[$lang] );
		}
	}
}This code will exclude posts in hidden languages from appearing in the sitemap's alternate language data. Please note that this solution might become outdated or may not apply to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.  | 
    
		                 | 
    0 | 5 | 3 months, 4 weeks มาแล้ว |