Results 1 to 6 of 6
-
16th Dec 2011, 05:04 AM #1OPMemberWebsite's:
craphumor.comPhp 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
Lukelukey372 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
-
16th Dec 2011, 05:29 AM #2Member
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'); } ?>
-
16th Dec 2011, 05:32 AM #3OPMemberWebsite's:
craphumor.comHey 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
-
16th Dec 2011, 05:34 AM #4Member
Missed a )
Code:<?php if(function_exists('wp_socializer')){ echo wp_socializer('plusone-button'); } ?>
-
16th Dec 2011, 05:37 AM #5OPMemberWebsite's:
craphumor.comThanks 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
-
16th Dec 2011, 06:00 AM #6Just 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>
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>
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
(vB 4.1.3) (Edit Required) Edit from code box
By champ_007_bond in forum vBulletinReplies: 0Last Post: 15th Dec 2011, 08:20 PM -
can u edit this ?
By Mars in forum WordpressReplies: 1Last Post: 27th Sep 2011, 10:36 PM -
how to edit this????
By raj1126 in forum vBulletinReplies: 1Last Post: 27th Nov 2010, 09:17 AM -
URL edit
By FancyPants in forum phpBBReplies: 3Last Post: 25th Feb 2010, 03:21 AM -
how can i edit this ?
By Chief-Editor in forum vBulletinReplies: 27Last Post: 27th Sep 2009, 11:27 AM
themaCreator - create posts from...
Version 3.47 released. Open older version (or...