WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using WordPress to develop a coupon site. Merchant pages are somewhat similar to this. I am using shortcodes in these pages for Facebook Like, Google +1, Customer Review, Codes from similar stores etc. The thing I want to ask is: is this a good way of doing all that? I am comparing this particularly with theme based solution i.e. developing templates files for custom (non-hierarchical) post type.

Which one would be more fast and elegant? Any other suggestion is welcomed. Thanks!

share|improve this question

Lucas Wynne linked some good plugins for such functionalities (I have used Addthis multiple times), however if you're looking for a plugin-free solution, i'd more likely filter the content in my functions.php file instead of using a shortcode :

some pseudo-code

 function add_content( $content ){
     $content .= "<a href=\"facebook\">FACEBOOK</a>";
     return $content;

For more info on the content filter : http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content

share|improve this answer
thanks for your answer. My question is more towards the design than incorporating sharing solutions. That's why I mentioned other shortcodes as well. Basically, I want to add these only to pages that represent individual merchants but not on pages that show list of merchants – a_fan Dec 15 '11 at 15:55
If your "Merchants" is a custom post type, i'd go with template files. You say "individual merchants", so the appropriate template file would be single-merchants.php if your CPT is called "merchants". Adding your your code / echoing shortcodes in that template file would be adding it for all individual merchants, and quicker than writing a shortcode in each post. – Shane Dec 15 '11 at 18:48
Useful diagram : codex.wordpress.org/images/1/18/Template_Hierarchy.png – Shane Dec 15 '11 at 18:50

Forget shortcodes for this.

Use one of these services:

Addthis: http://www.addthis.com/

Sharethis: http://sharethis.com/

They're free and will give you better insights.

share|improve this answer

Your Answer


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.