Hi guys,
I need to add a Google Forms verification tag to the head section of the homepage HTML code. I read a post here about copying the theme header.php file to the child theme and adding the tag in there. I did that, but all it did was to add a stripe at the top of the homepage with ‘ “/>’ in it.
Can you help please?
Many thanks,
Ann
you can add to the head section tags like meta tags links etc via your child-theme functions.php:
add_action('wp_head', 'add_to_head');
function add_to_head(){
if ( is_front_page( ) ){
?>
<meta name="google-site-verification" content="String_we_ask_for">
<?php
}
}
Or is_home( ) either it is a static blog page or a static page defined as landing page
To be sure you can take the ID of your homepage is_page(ID)
Hi Ann,
Please, try the solution above and let us know if you need any more help.
Best regards,
Victoria