Adding Google +1 Button

  • Anonymous


    Hi πŸ™‚

    I’m trying to figure out the Google +1 Button. I’m probably missing something obvious, or maybe I’m suffering from burn-out…

    What I want to do is have Google, and later Facebook and Twitter, buttons appear beside the little printer icon. Also, it seems that there should be a way to get the email envelope icon to show up there as well.

    When I put in the <g:plusone></g:plusone> in the social sharing box, it generates the plus one button inline with my page heading, causing it to be out of line.

    I’ve sorta found the bit that calls the printer icon, and where it calls the google icon with the view source function. (lines 144-148 & line 167?) I’m not finding it in the css or templates.

    I’m assuming that the rest of the google code is around somewhere, and I only need to call up the button when I find out where to put the code to do that. I’m also assuming that when I know where to place the code for the google button, I will be able to add facebook and twitter buttons in the same area.

    Thankyou for your time,

    Richard πŸ™‚

    I really need to get a child-theme going…


    Kenneth John Odle


    Seriously, the easiest way to do this is to just go over to, get their very simple code and add it to Graphene’s built-in sharing options. Quick, easy, no hurting your brain. And it looks good. Check it out:

    Some times youÒ€ℒre supposed to put it in the head, sometimes in the body. Some ways it slows down page loads, some ways it doesnÒ€ℒt

    If you are trying to do this without a child theme, you will need to hack theme files. This is always a bad idea as you will then have to do this all over again at the next theme update. Using the code, you don’t need to hack anything.



    Hi πŸ™‚

    I tried what you suggested, which might work in some cases.

    The issue that I’m having is that I end up with an additional line of text for the buttons. If you view the page (at least in IE) it shows the printer icon at the top left, where I want it, but the other buttons keep wanting to be on a row below that. I have had to add an additional blank line at the top of the text to keep the heading centered for the home page. I haven’t adjusted the other pages. Check the two pages:

    You can actually watch the heading ‘Privacy’ being shifted to the left as the icons load.

    I guess what I’m asking for is where is the call for the little printer icon, and can I not put the code in that area? I know I will probably have to adjust it somewhat so it looks right.

    Thanks πŸ™‚

    PS I just thought, is the printer icon generated by the option for a printer friendly page? and if so, can I add the code to that script, and where is the script? πŸ˜€


    Kenneth John Odle


    is the printer icon generated by the option for a printer friendly page?

    The printer icon that is all by itself is. The printer icon that is in the row with all the other sharing icons comes from AddThis.

    can I add the code to that script

    I don’t think so. The print option is built into Graphene.



    Thankyou Kenneth πŸ™‚

    I think that is the bit that I’m trying to find… Wherever that bit of script is, should be where I can attach the code for the other icons. I am guessing that I will have to select the print option to call up the code for the icons on all the pages and posts. But I need to find it first πŸ˜€



    Ok, some progress has been made I think… I put some code in the loop page as follows:

    /* Add a print button only for single pages/posts
    * and if the theme option is enabled.
    if ( $graphene_settings['print_button'] ) : ?>
    <?php graphene_print_button( $post_type ); ?>
    <?php endif; ?>

    <?php /* Add an email post icon if the WP-Email plugin is installed and activated */
    if( function_exists( 'wp_email' ) && is_singular() ) { echo '<p class="email">'; email_link(); echo '</p>'; }

    <!-- Place this tag where you want the +1 button to render -->
    <g:plusone size="small"></g:plusone>

    <?php /* Post title */ ?>

    What I now get is the +1 button at the top left above the title of pages, but its at least inline with the other icons, and similar in size. I don’t get the button on posts yet…

    I’ll get around to figuring out how to put that into a child theme later πŸ˜€

Viewing 6 posts - 1 through 6 (of 6 total)

  • You must be logged in to reply to this topic.