Hi,
I’ve searched but unable to find how to do this. I have the HTML code, but how do I add the metatag to all my pages?
I understand it should be in the header, so presumably something in the header.php file? I don’t know how to adapt the html in order to add it to a php file.
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
Please advise, thank you
Well you can add to the head section with
this to functions.php of your child-theme
add_action('wp_head', 'add_to_head');
function add_to_head(){
?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="best not more than 140letters">
<meta name="keywords" content=" seperated by commata ">
<link rel="shortcut icon" type="image/x-icon" href="/wp-content/uploads/icons/favicon.ico">
<link rel="apple-touch-icon" href="/wp-content/uploads/icons/apple-touch-icon.png">
<?php
}
everything like description is that you see in search on google under the url ( Real sentences with not more than 140 letters)
or keywords are the tags you look for – separated via commata
and viewport too
Hi SuperSportsUAE,
Does the solution from Guenni007 resolve your issue or do you still need more help?
Best regards,
Victoria
Thank you, I’ll give that a try.
Think it did, but decided to go with a plugin to avoid playing with things I don’t really understand :-)
Thanks
Hi SuperSportsUAE,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria