-
AuthorPosts
-
February 17, 2019 at 12:10 am #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.
February 18, 2019 at 9:45 am #1068213Hey 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,
RikardFebruary 21, 2019 at 1:38 am #1069756Hi 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.
February 21, 2019 at 5:09 pm #1070021Hi 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,
NikkoFebruary 22, 2019 at 1:16 am #1070149Thanks.
February 22, 2019 at 4:06 am #1070187Hi 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,
NikkoFebruary 25, 2019 at 5:52 am #1071141Hi Nikko.
I added the code to functions.php and functions-enfold.phpNo luck.
Please see ftp details below.
February 25, 2019 at 5:59 am #1071142PS: 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!February 26, 2019 at 8:15 pm #1071956Hi 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,
VictoriaMarch 2, 2019 at 6:56 am #1073527Bit Ninja is a side server security system used by our host Crazy Domains.
March 2, 2019 at 7:05 am #1073531Is there some other way to add meta tags rather than via the functions.php file?
March 2, 2019 at 6:15 pm #1073657Hi 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 -
AuthorPosts
- You must be logged in to reply to this topic.