Google button doesn't appear

143 Views Asked by At

Google +1 button don't want to appear.

I follow the method here: https://developers.google.com/+/web/+1button/

a post on my blog for example: http://misapuntesde.com/post.php?id=256

It's like post.php was a blacklisted page (it doesn't), because I copy/paste the same page to post_t.php and it works.

Google does not like me :(

1

There are 1 best solutions below

0
On

I'm not seeing the +1 button rending on your page sources. Something you are doing in your PHP code is not rendering the JavaScript include or the +1 markup.

Try adding this code to your site before your closing </body> tag:

<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

Next, add the following code where you want the +1 button to render:

<div class="g-plusone" data-annotation="inline" data-width="300"></div>