Harshit Kumar
Forum Replies Created
-
Forum: Plugins
In reply to: [XML News Sitemap Generator] XML Language formatThanks for the update 👍
That makes sense — glad the plugin worked well enough for your integration needs.
If you notice anything that could be improved or think a change might be useful for the core plugin, feel free to share it here.Appreciate you taking the time to report back.
Forum: Plugins
In reply to: [XML News Sitemap Generator] XML Language formatThanks for pointing this out 👍
You’re right —
get_bloginfo('language')returns a locale format likeen-GB, which does not comply with Google News sitemap requirements that expect an ISO 639 language code (e.g.en,fr,hi), except forzh-cnandzh-tw.I’ll update the plugin to normalize the value by:
- Converting the locale to lowercase
- Extracting only the ISO 639 language part before the hyphen
- Applying Google News exceptions for Chinese (
zh-cn,zh-tw)
Example fix:
$lang = strtolower( get_bloginfo('language') ); $lang = explode('-', $lang)[0];This should ensure the
<news:language>tag is always valid according to Google’s News Sitemap guidelines.Thanks again for the clarification and reference link.
Forum: Plugins
In reply to: [XML News Sitemap Generator] Plugin settingsHi, thank you for reaching out.
Currently, the plugin generates the News Sitemap automatically and does not support excluding specific categories. All eligible posts published within the last 48 hours are included by default, as required for Google News sitemaps.
Category-level control is not available at the moment, but we may consider adding this feature in a future update based on user demand.
Thank you for your suggestion and for using the plugin.