Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working on a blog which migrated from wordpress.com, which now is self-hosted. I created a theme based off their CSS customizations, and everything is working. I'm looking to add the Facebook and Twitter buttons, to the end of posts and end of posts on front page. Essentially In the same manner as wordpress.com.

I have found a slew of hideous share plugins. Which seem to be either be ugly hacks, or bloated full of web services via JavaScript. I want simple Facebook and twitter share buttons; not every service on the entire net; not bloated with third party web services.

The closer to the wordpress.com the better, a small 16x16 button and a text label. CSS for the image would be proper, but... not expecting miracles.

If anyone knows a good plugin that can be simply hacked up, or something that looks as wordpress.com but isn't a thick web service. please help me out.

NOTE: List of not acceptable plugins I've already experimented with. All of these use a JavaScript web service, most load multiple .js files some load from an outside source.

  • ShareDaddy / JetPack
  • ShareThis
  • AddThis
  • Socializer
  • SharePost
share|improve this question

2 Answers 2

up vote 1 down vote accepted

Why go for a plugin at all?? all you want is twitter & facebook share / tweet right ?

You can do this:

1. embed this shortcode in your functions.php (or shortcode page if you got one)

function shreplz() {
   return '
    <div class="sharebox">
    <div class="twittme"><a name="fb_share"></a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div>
    <div class="shareface"><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div>
    <br style="clear: left;" />
    </div>
   ';
}
add_shortcode('sharethis', 'shreplz');

.
2. Now you can use this shortcode anywhere in you theme like this:

<?php echo do_shortcode('[sharethis]'); ?>

Or directly from post / pages like this:

[sharethis]

.
3. If you want the 2 buttons to sit side by side paste this CSS in your style.css

/****** SHARE PLZ BUTTONS *****/
.sharebox {
width: 180px;
}

.shareface {
    float: left;
}

.
And thats all.. easy and clean and without the need to refix after upgrading a plugin.

share|improve this answer
    
I really needed a plugin so the PHP naive could update WordPress easily. My contract already ended at that location, and your answer was the closest to what I was looking for. So you got awarded answer, thanks for your help. –  TechZilla Nov 22 '11 at 8:55
    
Well.. glad i helped in someway ;) –  Sagive SEO Dec 3 '11 at 13:46

http://wordpress.org/extend/plugins/jetpack/

This brings a lot of wp .com features to self hosted. I've never used .com, so I'm not sure if this is identical or not, but in brings in the share features. Since it is a WP product, I assume that share is identical, but I haven't verified that to be honest.

It may have too many features, for what you are looking for.... but a lot of the stuff can be turned off

share|improve this answer
    
The output is considerably diffrent; Enough so that the CSS on WP.com won't work, without practically reimplementing it. More importantly Jetpack is a bloated web service, exactly what I want to avoid; As previously stated. If I just wanted Jetpack's share button feature, I would just use ShareDaddy. (Jetpack is a good plugin, just for stated reasons not what I'm looking for) –  TechZilla Sep 26 '11 at 17:50
    
I do appreciate that you took the time to help! I hate the WP.org plugin search so much, I'm practically frothing at the mouth mad. If you search by anything other than relevancy, the results are way off the mark useless. –  TechZilla Sep 26 '11 at 18:00
    
Sorry that one was no good, like I said, I've never looked at .com's sharing stuff. As for the plugin search..... searching at .org is on the long list of things to get fixed. Hopefully something better comes our way –  Rev. Voodoo Sep 26 '11 at 19:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.