If you ever visit our actual website, you’ve probably noticed the “Print This” button that we display below each post.  Depending on the type of website or blog you are running, having a button like this may be a good fit for your blog.  I’ve found it to be good to have this button available to readers for any type of website that offers tutorials, recipes, guides, or pretty much anything that might require a visitor to print something you’ve written.

If you think you’d like to offer your readers the option to print something on your blog, here is the code I use on my blogs (uses Javascript):

<a href="javascript:window.print()" rel="nofollow">Print This!</a></span>

It prints the page you are on, so it is probably best to use it mostly on post and pages.  If you place it on the blog’s homepage, it will print the entire homepage, not just that post. 

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Connect with Kyle on Twitter or Google+!

  • Emmanuel

    This script launch the print feature of your browser. So you print the whole page, with the content, but also, advertising, sidebar …

    I use the plug-in WP-Print of Lester Chan. This plugin generates a new page, with only the post. Links are also displayed

    • http://tongstromberg.com Lars Tong Strömberg

      “This plugin generates a new page, with only the post.”

      Isn´t this the problem? Duplicate content…?

  • http://kyleeslick.com Kyle Eslick

    @ Emmanuel – You’re right. I actually have a post going up tomorrow about print stylesheets, so I will expand upon that soon!

    Wp-Print is a great option as well. I will probably feature “printing” plugins here in the near future.

  • Pingback: Imprimir un post en WordPress | docs4beto

  • http://www.wpproject.com Richard H

    Kyle, WP-Print is the one I use too—it’s excellent.

    I’m looking forward to your upcoming post though, featuring other print plugins. It’s always nice to have alternatives and options.

  • http://thoushallblog.com Yan

    I’m glad that I look no further for a plugin that would print only the post and not the entire page.

  • Hariharakumar

    Great code man. Really awesome. I will add PRINT button to my blog. Thanks u very much.Your blog rocks.

  • http://datanomia.com/ Mike Kubrisck

    Really awesome. I will know if i can add a icon.

  • Pingback: How To: Creating a Print Stylesheet in WordPress

  • http://www.eventurebiz.com John Hoff – eVentureBiz

    Very cool. I’d take this code over a plugin anytime. I like the fact that the javascript code won’t make a php call to the database (slow things down) and the ability to easily customize things (like adding any picture you want as a print button).

  • Pingback: Compilation of WordPress Hacks

  • Pingback: Wordpress Hacks, Guides and Tricks | TechnoBuzz.net

  • Pingback: WordPress ?? ??? ??? snippet

  • Pingback: Top 30 Most Wanted Wordpress Tricks and Hacks | Make Money Blogging Experiment

  • Pingback: 100+ Killer Wordpress Resources | Steffan Antonas' Blog

  • Pingback: Collection of WordPress Hacks | WordPress Hacks

  • Pingback: 22 Mixed Quality Wordpress Hacks | KolayOnline

  • Pingback: 70 Very Useful Wordpress Hacks & Tricks » De Web Times - Sharing Useful Resources.

  • Pingback: Wordpress’te ??inize Yarayabilecek 10 Tane Kod Bütünü | Desmal.Org | Desmal Ye?ilmen ?nternet | Program | Seo | Gündem..

  • http://raihem.blogspot.com Raj

    Very helpful code and its great way to explain with the live code :)

  • Pingback: 37 Cool Wordpress Hacks And Tutorials You Should Try |

  • Pingback: 37 Cool Wordpress Hacks And Tutorials You Should Try | Afif Fattouh - Web Specialist

  • Pingback: 37?Wordpress???? | ???

  • Pingback: 5 Solutions to Common WordPress Problems | LonePlacebo

  • http://www.jigneshbapna.com Jignesh

    Thats Amazing….

    Good

  • Pingback: 60 Most Wanted WordPress Hacks | stylishwebdesigner

  • Pingback: 10 codes les plus utilisés dans Wordpress | Junksource

  • http://nunungnuraida.wordpress.com Nunung Nuraida

    I really want to put “print this” button in every post I have, but I still don’t know where to put the code. I use the chateau theme. Can you please tutor me?

  • Pingback: 37 Cool WordPress Hacks And Tutorials You Should Try : Web design

  • Faozul Azim

    this prints the whole page. how about the post content only?