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.

This question relates to plugins for Linkedin Share buttons, Twitter Tweet buttons, and Facebook Like buttons.

These are for blog posts on a WordPress blog which is at a subdomain of a site that is built in CakePHP.

Considering the possibility that plugins can become outdated, and that if this happens there is a possibility of losing the counts of shares / tweets / likes, I'm wondering if it's better to add in these sharing buttons manually into the single.php theme file.

Is it better to use plugins to add in these buttons, or to add the buttons manually into the single.php theme file?

share|improve this question
add comment

5 Answers 5

Plugin, even if you code it yourself. the administration seems to go more smoothly for me. Even if your theme is fully custom, feature separation is still a solid practice.

If you switch themes, if the code becomes outdated, if you want to remove it, if you need to extend it... any changes become simpler to implement.

share|improve this answer
add comment

I prefer to do this directly in my themes. Considering how many issues can arise from either using too many plugins (lots of clients will install 50 plugins and then notice things not working), plugins with bad interactions or plugins that think they need to include their own copies of things like JS libraries.

The biggest con is that your code will become outdated eventually. With plugins you don't have to worry about maintaining the code for the rest of time.

share|improve this answer
add comment

If you are very sure that you are not going to change the theme then it is fine if you add these buttons in your single.php file. But if there is a plausibility that you will be changing template frequently then using a plugin would be better option.

share|improve this answer
add comment

Basically This becomes a question of Plugin VS. Custom coding,

This question as been asked before and some people feel that if there is a plugin then go with it, while others feel that they rather trust no one with there site's code and functionality, or know they can code it in a better way so they write there own code.

I follow my golden rule of if its coded good and working "why reinvent the wheel?" .

So if i need some kind of functionality i look for plugins that are by known coders, have more then a single version and are regularly updated. If nothing comes near that i look at old plugins that "used to work" study them and then i either fix them and change them to my specific needs or write as new from scratch.

The same way a plugin could stop working (not function as expected) so can your own code that you put in your single.php or any other file for that matter especially when working with external API's like FaceBook, Twitter and LinkedIn that keep changing every now and then.

That's just my opinion there are no right and wrong here.

share|improve this answer
add comment

Using a plugin is always a quick and easy thing to do, until it goes wrong. I am a fan of less plugins (unless you really need them) and more hard-code reason is that you then have full control of what goes into your project.

And at the comment on "plugins can become outdated and that..." i think you answered your own question with that one line :)

Write more, worry about less -> thats my motto :D

share|improve this answer
    
But your code will also become outdated, no? If a plugin becomes outdated you are free to update it yourself, but at least you have a chance that the author (or someone else) kept it up to date. If its your own code, you are sure no-one else will do it. –  Jan Fabry Apr 8 '11 at 9:30
    
Well it depends entirely on what you are doing, for example facebook would update their "like" button maybe once in a blue moon, so if i had wrote custom code to include a like button on my posts it would be valid regardless. But Wordpress updates regularly, so plugins become outdated because they don't work with upgrades of wordpress. With your own code it will work regardless if you hardcode it in (without writing your own plugin). Again this is all down to personal preference as stated above there is no right or wrong answer. –  Xavier Apr 9 '11 at 14:22
add comment

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.