WordPress.org

Support

Support » How-To and Troubleshooting » Trying to Add Google Verification Meta Tag to Homepage

Trying to Add Google Verification Meta Tag to Homepage

  • trying to add google analytics to my blog and this is KILLING ME! now i have to verify my site?! Google says to add ‘<meta name=”google-site-verification” content=”PLP2w5np4oUWb8L4HDmqNaL8T-qbMMVwGnlwG40dtHc” />’
    to the front page code.

    Someone help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    @esmi

    Forum Moderator

    Add the line to your theme’s header.php file just before the </head> tag.

    I have been trying to do the same (add meta tag to verify ownership). I add the code to my header.php file before the </head> tag, update file, and attempt to verify, and google says that they can’t find the code every time. What could I be doing wrong?

    well….if you post a link, we can peek and make sure it’s in the right place

    I DID IT!

    Can anyone tell me why this appears at the top left of my pages. it shows ‘ content”/> It happened when trying at add meta google thing.

    Here is my header.php, can’t see a problem, can you?

    Site in question: ptoone.com

    Thanks!

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes(); ?>>
    <head profile=”http://gmpg.org/xfn/11″>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />
    <title><?php if (is_home () ) { bloginfo(‘name’); } elseif ( is_category() ) { single_cat_title(); echo ‘ – ‘ ; bloginfo(‘name’); }
    elseif (is_single() ) { single_post_title(); }
    elseif (is_page() ) { bloginfo(‘name’); echo ‘: ‘; single_post_title(); }
    else { wp_title(”,true); } ?></title>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/script.js”></script>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <!–[if IE 6]><link rel=”stylesheet” href=”<?php bloginfo(‘template_url’); ?>/style.ie6.css” type=”text/css” media=”screen” /><![endif]–>
    <!–[if IE 7]><link rel=”stylesheet” href=”<?php bloginfo(‘template_url’); ?>/style.ie7.css” type=”text/css” media=”screen” /><![endif]–>
    <link rel=”alternate” type=”application/rss+xml” title=”<?php printf(__(‘%s RSS Feed’, ‘kubrick’), get_bloginfo(‘name’)); ?>” href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”<?php printf(__(‘%s Atom Feed’, ‘kubrick’), get_bloginfo(‘name’)); ?>” href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_head(); ?>
    </head>
    <body>
    <div id=”art-page-background-glare”>
    <div id=”art-page-background-glare-image”></div>
    </div>
    <div id=”art-main”>
    <div class=”art-Sheet”>
    <div class=”art-Sheet-tl”></div>
    <div class=”art-Sheet-tr”></div>
    <div class=”art-Sheet-bl”></div>
    <div class=”art-Sheet-br”></div>
    <div class=”art-Sheet-tc”></div>
    <div class=”art-Sheet-bc”></div>
    <div class=”art-Sheet-cl”></div>
    <div class=”art-Sheet-cr”></div>
    <div class=”art-Sheet-cc”></div>
    <div class=”art-Sheet-body”>
    <div class=”art-nav”>
    <div class=”l”></div>
    <div class=”r”></div>
    <ul class=”art-menu”>
    <?php art_menu_items(); ?>

    </div>
    <div class=”art-Header”>
    <div class=”art-Header-jpeg”></div>
    <div class=”art-Logo”>
    <h1 id=”name-text” class=”art-Logo-name”>
    /”><?php bloginfo(‘name’); ?></h1>
    <div id=”slogan-text” class=”art-Logo-text”>
    <?php bloginfo(‘description’); ?></div>
    </div>

    </div>

    PHP google site verification
    @esmi, can you please give an example where should I add it in my header tag

    Ptoone,
    I put the code you posted on pastebin: http://pastebin.com/3gahKrTV . The mods will delete it from your post because it is not enclosed in backticks

    Something is adding this to your html:
    <meta name="<meta name=\"google-site-verification\" content=\"zEx0Fuyn3PpUd6qNPvunJfVB8mpJrnkg85nz3r7dA78\" />" content="" />

    Then a few lines under it is there again but without errors. Are you adding the google verification through a plugin?

    Also your header php has a bunch of code errors see here:
    http://validator.w3.org/check?verbose=1&uri=http://www.ptoone.com/index/about/f-a-q/

    Just wanted to say thanks to y’all for helping answer this post – @esmi, @rev.voodoo @c3mdigital — I spent days trying to figure this out on my own and you guys solved it in one post.

    My glass raises to you!!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trying to Add Google Verification Meta Tag to Homepage’ is closed to new replies.
Skip to toolbar