Search code examples
drupaldrupal-7meta-tags

Custom meta tag in Drupal not working


I wanted to add following meta tag:

<meta name="google-site-verification" content="XXXXXXXXXXXXXXXXXXXXXXXXXXX" />

For that I used Admin > Config > Search and Metadata > Custom Meta tags Setting

And created meta tag there.

But the meta tag is not visible in page source code in browser.

What step am I missing?

Version: 7.35 The meta tag i added appears in list of meta tags here.

Picture: enter image description here


Solution

  • Here is a way for you to find an issue.

    Below you will find a screen of function that adds tags to header.

    enter image description here

    According to conditions you have possibly next issues:

    1. $meta_tags is null. It means that this query return nothing

      $result = db_query("SELECT * FROM {custom_meta}");

    2. you have 'admin' as an argument.

    Please debug those 2 variables ($meta_tags and arg(0) and provide us feedback.

    dpm($meta_tags);
    dpm(arg(0));
    

    I believe you will figure out during debug the issue.