Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1067840

    Hi. I would like to add this to the head section:

    <meta name=”referrer” content=”origin”>

    I don’t use a child theme.

    Thanks. Mark.

    #1068213

    Hey Mark,

    Please try this in your functions.php file:

    function mark_add_meta_origin(){
    ?>
    <meta name="referrer" content="origin">
    <?php
    }
    add_action('wp_head', 'mark_add_meta_origin');

    Best regards,
    Rikard

    #1069756

    Hi Rikard.
    Thanks but it didn’t work.
    I have been using this code for other sites of mine:

    function google_meta_tag(){
    ?>
    <meta name=”referrer” content=”origin”>
    content=”Google_String”>
    <?php
    }
    add_action(‘wp_head’, ‘google_meta_tag’);

    It has worked on them all except for http://www.thegreatoceanwalk.com

    Also on some of the other sites I just added it in the Google Services section and that worked!?

    ????Mark.

    #1070021

    Hi Mark,

    Can you give us temporary admin access? so we can look further in your backend.
    Just post the login details in private content, so it’s only visible to the moderators.

    Best regards,
    Nikko

    #1070149

    Thanks.

    #1070187

    Hi marko7,

    Thanks, I have checked your functions.php file and I could not see the code, I attempted to add this:

    function google_meta_tag(){
    ?>
    <meta name="referrer" content="origin">
    <?php
    }
    add_action('wp_head', 'google_meta_tag');

    but I got this error:

    Sorry, your request has been blocked

    Please try to add the code,

    Best regards,
    Nikko

    #1071141

    Hi Nikko.
    I added the code to functions.php and functions-enfold.php

    No luck.

    Please see ftp details below.

    #1071142

    PS: Nikko. I then tried to add the code via the Editor in Appearance and I got the same error as you did.
    Bloody Bit Ninja! It doesn’t like my IP for some reason but why would it block you?
    I am having a terrible time with this bloody security Ninja!

    #1071956

    Hi marko7,

    You can disable and delete that plugin if it gives you trouble and use some other security plugin.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1073527

    Bit Ninja is a side server security system used by our host Crazy Domains.

    #1073531

    Is there some other way to add meta tags rather than via the functions.php file?

    #1073657

    Hi marko7,

    Yes, there are 2 ways. The first one is to use a plugin that can inject codes (which still uses hooks & filters).
    The 2nd one is to copy header.php file from your parent theme to the child theme, then manually adding the meta tag there.

    Best regards,
    Nikko

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