Activity Stream
48,167 MEMBERS
6610 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    craphumor.com

    Default Php edit

    So I have been trying to add a google +1 button from a wordpress plugin and I am getting errors when adding in the php part of the script I have gotten:

    <?php
    if(function_exists('wp_socializer'){
    echo wp_socializer('plusone-button', array(Settings));
    }
    ?>

    Could anyone point me in the right direction / edit the code for me ?

    Regards

    Luke
    lukey372 Reviewed by lukey372 on . Php edit So I have been trying to add a google +1 button from a wordpress plugin and I am getting errors when adding in the php part of the script I have gotten: <?php if(function_exists('wp_socializer'){ echo wp_socializer('plusone-button', array(Settings)); } ?> Could anyone point me in the right direction / edit the code for me ? Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    You should put the settings in the array, don't just put the word settings there. If you want the default, you should be able to omit that parameter.

    Try:


    Code: 
    <?php
    if(function_exists('wp_socializer')){
    echo wp_socializer('plusone-button');
    }
    ?>

  4.     
    #3
    Member
    Website's:
    craphumor.com
    Hey mate,

    Thanks alot but i got this error.

    Parse error: syntax error, unexpected '{' in /home/proxypro/public_html/Mauhab.com/wp-content/themes/mauhab/sidebar.php on line 4

  5.     
    #4
    Member
    Missed a )

    Code: 
    <?php
    if(function_exists('wp_socializer')){
    echo wp_socializer('plusone-button');
    }
    ?>

  6.     
    #5
    Member
    Website's:
    craphumor.com
    Thanks alot, I got no errors etc but nothing is displaying

    I'll just hire someone to do it for me thanks for your help though.

    Regards

    Luke

  7.     
    #6
    Just Another Coder
    I would say don't use plugins for simple scripts which you can add without any difficulty.

    You can customize the +1 button from here - http://www.google.com/webmasters/+1/button/

    From the website after you customize you will get two parts of code like this below

    Code: 
    <!-- Place this tag where you want the +1 button to render -->
    <g:plusone annotation="inline"></g:plusone>
    Place the following script code you get in the footer just above the </body> code

    Code: 
    <!-- Place this render call where appropriate -->
    <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>
    Source - http://www.google.com/webmasters/+1/button/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. (vB 4.1.3) (Edit Required) Edit from code box
    By champ_007_bond in forum vBulletin
    Replies: 0
    Last Post: 15th Dec 2011, 08:20 PM
  2. can u edit this ?
    By Mars in forum Wordpress
    Replies: 1
    Last Post: 27th Sep 2011, 10:36 PM
  3. how to edit this????
    By raj1126 in forum vBulletin
    Replies: 1
    Last Post: 27th Nov 2010, 09:17 AM
  4. URL edit
    By FancyPants in forum phpBB
    Replies: 3
    Last Post: 25th Feb 2010, 03:21 AM
  5. how can i edit this ?
    By Chief-Editor in forum vBulletin
    Replies: 27
    Last Post: 27th Sep 2009, 11:27 AM

Tags for this Thread

BE SOCIAL