Invalid Tag Value – Google Search Console – Issue

[ad_1]

Hi,

I see that you set up the language code in WPML as kr-KR or kr_KR. Why did you not use the standard ko_KR notation?

The sitemap plugin will take the first part of the language code to use in the news sitemap. This means the issue would be solved by setting the language code to ko_KR in WPML… Is that an option for you? You’d need to set up a general 301 redirect from all /kr/* requests to /ko/* to not loose ‘old’ traffic of course…

If this is not desirable, you can use the filter described on https://premium.status301.com/knowledge-base/xml-sitemap-google-news/filter-hooks/xmlsf_news_language/ to replace any “kr” with “ko” in the news sitemap. You can put this PHP code in any Code Snippets plugin:

add_filter(
    'xmlsf_news_language',
    function( $lang ) {
        return ( 'kr' === $lang ) ? 'ko' : $lang;
    },
    100
);

Hope that helps 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer