[resolved] g+ Implementation (3 posts)

  1. sangram.patra
    Posted 4 years ago #

    Anyone is there.

    I want to use g+ share button in my author page to share my custom link to g+ but i am not able to do this.

    I have written the code like below :

    <script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
    <g:plusone href="<?php echo get_permalink();?>"></g:plusone>

    I know ther is a plugin for that but i want to use it only for custom link share link.


  2. Marventus
    Posted 4 years ago #


    Your issue is most likely related to the fact that you are using the HTML 5 version instead of the XHTML version. Your theme is very likely to be coded in XHTML and not in HTML 5.
    Add this line of code in the <head> section of your blog in header.php, before the </head> tag:

    <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
    { parsetags: 'explicit' }

    and place this code where you want the g+ button to appear:

    <div id="plusone-div"></div>
    <script type="text/javascript">
            "size": "standard",
            "count": "true"

    If you wish, you can change the appearance of the button by changing the size parameter and enable/disable the share count. For more information about these paramters, you should check out the g+ documentation.


  3. Marventus
    Posted 4 years ago #


    Were you able to figure this out? If so, could you please mark this thread as resolved?


Topic Closed

This topic has been closed to new replies.

About this Topic