This topic has 4 replies, 3 voices, and was last updated 6 years, 2 months ago ago by Rose Tyler
I’d like to verifiy my company store site without having to add yet another plugin.
I tried adding this code to the child functions.php but it’s not working (I replaced the verification id with some dummy text).
function etheme_add_gsc_meta_tag(){
if( ! is_home() || ! is_front_page() ) return;
#replace your meta tag below
echo '<meta name="google-site-verification" content="MYGSC-ID######" />';
}
add_action( 'wp_head', 'etheme_add_gsc_meta_tag' );
Can you help me? THANKS!
Hello,
Use
function etheme_add_gsc_meta_tag(){
if( ! is_front_page() ) return;
#replace your meta tag below
echo '<meta name="google-site-verification" content="MYGSC-ID######" />';
}
add_action( 'wp_head', 'etheme_add_gsc_meta_tag' );
Regards
Worked like a charm! Thank you!
Hello,
You’re welcome!
Regards
You must be logged in to reply to this topic.Log in/Sign up