Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1066645

    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

    #1066700

    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)

    #1067155

    Hi Ann,

    Please, try the solution above and let us know if you need any more help.

    Best regards,
    Victoria

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.