Tagged: x
-
AuthorPosts
-
May 5, 2016 at 2:53 am #913932
I’m trying to claim my Facebook Instant Articles URL
And it is saying that I need to put this <meta property=”fb:pages” content=”1653689774900101″ />
“To claim your website’s URL, add the following meta tag to your website’s <head> tag in the HTML and then specify the URL below.”
Could you please guide me of where to put this quote at, my guess is somewhere in the editor.
May 5, 2016 at 9:02 am #914269Hey Matthew,
Please see this tutorial http://www.wpbeginner.com/plugins/how-to-add-header-and-footer-code-in-wordpress/ to learn how to add code to the <head> tag in WordPress.
Thanks.
June 21, 2016 at 5:27 pm #1053315Hey amazing ppl,
I have followed the link and did everything ti said but FB still shows error as the code is not included!!
see attached pls
cheers,
khalidJune 22, 2016 at 12:05 am #1053764Hi Khalid,
Thanks for writing back. You can try this instead as it supposed to add meta and the other one should add scripts – https://wordpress.org/plugins/add-meta-tags/
Cheers!
June 22, 2016 at 1:13 pm #1054773Thanks but unfortunately your mentioned plugin is for SEO/Meta purpose for showing title, description in Search engine and social media. It is not for adding Meta Tags in <head>.
what other options we have got here?
June 22, 2016 at 1:25 pm #1054800Hi,
To explain further, I am not a technical person but I am trying to add my instant article for FB to my blog.
I have added the tags as FB requested to head section using your plugin and many others:
<meta property=”fb:pages” content=”1523012057993916″ />
however GB still shows that the following error message:
The fb:pages tag on the url doesn’t contain this page’s id. The url has fb:pages tag but they don’t have this page’s id. Please work with your developers / webmaster to add this tag to your website.
can you help pls?
cheers,
khalid zidanJune 22, 2016 at 4:07 pm #1055111Hi Khalid,
Please install the child theme and then activate it then add this code in the
functions.php
of the child theme:add_action('wp_head', 'custom_script'); function custom_script() { ?> <meta property="fb:pages" content="1653689774900101" /> <?php }
Hope this helps.
June 22, 2016 at 5:41 pm #1055216oh come on guys! it messed up my whole site, see attached error!
I had to fix it through FTP!
what other solution you have got???
June 22, 2016 at 11:33 pm #1055737Hi There,
I did test that code on my end, and I did not have that error. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
June 23, 2016 at 5:06 pm #1057075This reply has been marked as private.June 23, 2016 at 11:24 pm #1057563Hi There,
I can’t connect to your server via FTP. See attached for the error.
Can you add the code again on your child theme’s functions.php file. Make sure that you have copied the entire code. If the issue still exists, please post your functions.php file code here so we can see where the error coming from.June 24, 2016 at 2:27 pm #1058438This reply has been marked as private.June 24, 2016 at 6:50 pm #1058649Hi Khalid,
It displayed an error since you edited the code incorrectly.
Please do it this way:
add_action('wp_head', 'my_tracking_pixel'); function my_tracking_pixel() { ?> <!-- <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '440604012709948'); fbq('track', "PageView");</script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=440604012709948&ev=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code --> <?php }
Hope this helps.
June 26, 2016 at 7:11 pm #1060533Am I missing something?
where is the code that I wanna add from the start?
<meta property=”fb:pages” content=”1653689774900101″ />
June 26, 2016 at 9:37 pm #1060751Hello There,
Please update the contents of your child theme’s functions.php file. You can use this instead:
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= // Add Tracking Pixel // ============================================================================= function my_tracking_pixel() { ?> <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '440604012709948'); fbq('track', "PageView");</script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=440604012709948&ev=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code --> <?php } add_action('wp_head','my_tracking_pixel'); // ============================================================================= // Add Custom Script // ============================================================================= function custom_script() { ?> <meta property="fb:pages" content="1653689774900101" /> <?php } add_action('wp_head', 'custom_script'); // =============================================================================
Please let us know if this works out for you.
-
AuthorPosts