Incorrect hreflang
// hreflang | only if WMPL is not activeif( ! function_exists( 'icl_object_id' ) ){$format_locale = strtolower( str_replace( '_', '-', get_locale() ) );echo '<link rel="alternate" hreflang="'. $format_locale .'" href="'. get_permalink() .'" />'."\n";}
According to google's guidelines: https://support.google.com/webmasters/answer/189077?hl=en , the ISO standard is upper case country, which would be en_US in that example.
Wordpress adds the proper ISO code, so the page HTML tag is:
<html lang="en-US"
The workaround for this currently is to add a function like this to the BeTheme child theme to trick it into thinking WPML is installed.
//Define the WMPL function to trick BeTheme into thinking the plugin is installed so it stops adding hreflangfunction icl_object_id(){}
- If you must add a hreflang attribute, at least make it match the ISO standard google is expecting.
Comments
Thank you for your suggestion.
Of course, we'll take care of it in the future update.
Greetings