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 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
add comment

2 Answers

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 –  afnrf Dec 15 '11 at 15:55
2  
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
add comment

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
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.