Google Meta verification

I try to set Meta Google verification.
How to set inside HEAD and META element as verification like XXX and the whole element

<meta name="google-site-verification" content="XXX" />
add_action('wp_enqueue_scripts', 'enqueue_google_meta_verification');

function enqueue_google_meta_verification()
    wp_enqueue_script('google_meta_verification', '<meta name="google-site-verification" content="XXX" />', array(), null, true);
add_action('wp_enqueue_scripts', 'enqueue_google_meta_verification');

You are using the wrong hook. You should use wp_head to insert tags and such into the <head></head> tags. wp_enqueue_scripts is for adding JavaScript files to the page.

Look at the user contributed notes for an example of how to use wp_head

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.