Support » Theme: Oxygen » How to remove a Meta Tag

  • Resolved qualalbatroz


    Hi Guys,

    So, I’m Trying to get my site past W3C Validation, and one of the errors is the following:

    Bad value template for attribute name on element meta: Keyword template is not registered.
    <meta name=”template” content=”Oxygen 0.5″/>

    So I’m thinking I’ll just remove the thing from the Code completely. But I just can’t find it, wouldn’t you know.

    It should be in the header.php file, right? Wrong.
    Can you help?

    You can see my site here:

    Let me thank you in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ensure you are using a child theme so you can edit code without it later being over-written with a theme update:

    Create a functions.php file:

    Inside functions.php add this code:

    function remove_hybrid_meta_template() {
        remove_action( 'wp_head', 'hybrid_meta_template', 1 );
    add_action( 'init', 'remove_hybrid_meta_template' );

    See “Removing Actions and Filters” in

    remove_hybrid_meta_template is just a name I made up.

    remove_action removes add_action( 'wp_head', 'hybrid_meta_template', 1 ) called in /wp-content/themes/oxygen/library/hybrid.php.

    hybrid_meta_template is defined in /wp-content/themes/oxygen/library/functions/utility.php.

    Hey mikedev,

    Thank you so much! This solved my problem. Thank you. And thank you for explaining the solution.

    I still have another similar problem, and You might be able to help me with that one too.

    Validation doesn’t like this line in my Header:
    <meta http-equiv=”Content-Language” content=”pt-BR” />

    what would be the code to remove this bit?

    Oh, and a Happy new Year!

    Thanks, Marc

    That meta tag is added by the qTranslate plugin. Here’s the same issue:

    The code is in /wp-content/plugins/qtranslate/qtranslate_hooks.php.

    First try remove_action('wp_head', 'qtrans_header'); in your child theme functions.php, but that will remove everything in qtrans_header, some of which you might need.

    The other option is to copy all of qtrans_header into your child theme functions.php, rename it to something like qualalbatroz_qtrans_header, comment out the Content-Language line, then add_action('wp_head', 'qualalbatroz_qtrans_header');.

    remove_action('wp_head', 'qtrans_header');

    This worked just fine it seems there was nothing important in the qtrans_header. just a bit of useless css. there is so much clutter in wordpress because of all the diferente stuck on bits a site is made of.

    Let me thank you again for sharing your knowledge.

    All the best for 2014.

    I know the post is old, but i try… I refer to mikedev’s last message, if I want to change only a string in a function in qtranslate_hooks.php, have I still to remove that function and create another one or is there a way to make only an adjustment?

    Precisely, I have to change only css parameters in qtrans_header function, the string is this:

    $css .=”.qtrans_flag { height:12px; width:18px; display:block }\n”;



    Moderator Andrew Nevins


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove a Meta Tag’ is closed to new replies.