Hi
Facebook wants to verify my site.
I have pasted the code in Theme options – Google Services, cleared the cache and can see it in the head in dev tools when I inspect the code.
However facebook cannot verify it. I checked what facebook scraper sees after debugging here https://developers.facebook.com/tools/debug
and sure enough facebook does not see the verification, the pixel or google code.
I have tried creating a header.php for the child theme as seemed to be suggested elswhere in the forum but it will not accept the facebook supplied code. It says error unexpected < .
I am a bit stumped. The verification and pixel were working fine and I can see them in the head but facebook now can’t.
I’d be grateful for any thoughts
Hey Sujohn,
Could you share the full code you are looking to add please? We can give you a function to use instead.
Best regards,
Rikard
Hi
The code I posted in the private setting is the full code given by facebook to insert in the header.
When you give me the function can you include absolutely everything I need to put in the header.php file
Thanks
Hi,
Please try this in functions.php:
function add_fb_domain_verification(){
?>
<meta name="facebook-domain-verification" content="9y9ff7ytzccxx0dw747spvek85b6pc" />
<?php
}
add_action('wp_head', 'add_fb_domain_verification');
You don’t need to add anything in header.php, and you can remove the code from analytics field in the theme options.
Best regards,
Rikard
That was successful – thanks.
Hi,
Glad Rikard was able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike