First, for what its worth, the link above that I gave has changed to:
but it doesn't matter, as you cannot see the php lines, because they are rendered before you call upon them to view it... Plus, that was a dummy test I used to toy around with this stuff, and is not what I'm using on my site.
if you want to avoid coding, here's the simplest solution I can think of:
First: install Simple Facebook Connect and Simple Twitter Connect plugins, activate their bases, then activate SFC-share (or SFC-like) and STC-tweet button. Go to your wordpress theme and settings to set each up, per the instructions on those pages. For each, click the radio button for the option "manually include the button" in your code.
Next, add and activate the plugin "Allow PHP in posts and pages" by Hit Reach. This will allow you to paste the following code at the end of every post you want it.
Paste this code in your post (you can next it in HTML tables or what not to get it to orient the way you'd like):
<?php if (function_exists('stc_tweetbutton')) echo stc_tweetbutton();?>
<?php if (function_exists('sfc_like_button')) echo sfc_like_button(array('layout'=>'button_count','showfaces'=>'false','width'=>'130','height'=>'25','action'=>'recommend','colorscheme'=>'light','font'=>'lucida+grande'));?>
These are the options for the above code:
'id'=>0, // id of the facebook page to like? (not sure), if 0, likes the present page?
'layout'=>'standard', // standard or button_count
'showfaces'=>'true', // true or false
'action'=>'like', // like or recommend
'colorscheme'=>'light', // light or dark
'font' => 'lucida+grande', // arial, lucida+grande, seqoe+ui, tahoma, trebuchet+ms, or verdana
For a share button instead of a like button:
<?php if (function_exists('sfc_share_button')) echo sfc_share_button();?>
I strongly encourage the share button, not the like button, for posts. The like button should not be different for every page. For example: all my like buttons now are setup to like the facebook official page, not the present page on my website. If you have people like individual pages, it merely dilutes your total likes, and you have no good way to track those likes either. As I do on my site ( http://www.derekbeck.com/1775/ ), people can like the site, which is really liking the facebook official page, and they can fb share or tweet after any post. If you must use likes for your posts, I encourage you to use "recommend" instead of like, especially if you are also using a like for the site which is tied to a facebook fan page.
Full disclosure: I abandoned this approach and ended up hard-coding my tweet and like and share buttons onto my site. It seemed it was the only way to get the buttons placed exactly as I wanted them.
Lexevan: if you desire to hard-encode, you don't need php. I wrote the like button using the techniques below and saved it to a php file, and I wrote the twitter and fb share button using the code below and put it into another php file. I then dug into my WP theme and placed a call for each of these php files in the places I wanted them to appear, the former on all pages, the latter only on posts or static pages. Depending on your theme, you may be able to easily get to the place you need to make these calls: "the loop". But if this is too much an undertaking, you can simply manually type the following code into your posts whenever you desire it. Alternatively, you can put this code into a text widget for a sidebar. The following techniques do not require ANY of the plugins just noted above.
for the fb share button, paste this code:
<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a>
(note: the share button is 20px high)
facebook seems to not encourage this button any longer, so finding details on it on their site is hard... but their like buttons are problematic, as noted above
for the twitter tweet button, paste this code:
<a href="http://twitter.com/share" class="twitter-share-button" data-text="any prefix text you'd like in the tweet" data-count="horizontal" data-via="a twitter username">Tweet</a>
(note: the tweet button is 20px high)
For the twitter button, to find all the variables, see http://twitter.com/about/resources/tweetbutton
for the facebook like button, paste this code:
<iframe src="http://www.facebook.com/plugins/like.php?href=YOURWEBSITEORFACEBOOKPAGETOLIKE&layout=standard&show_faces=false&width=450&action=like&font=arial&colorscheme=light&height=30" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:30px;" allowTransparency="true"></iframe>
For the like button, facebook will generate the button for you, though their wizard is clunky. See http://www.facebook.com/share/
Finally, as I've taken long to explain all of this to you, if you find it useful, please go to my own website and please consider sharing it by fb or twitter to all of your history friends (my site is "1775", a forthcoming history book), and i would of course welcome it if you like the page as well! :) My site: http://www.1775thebook.com