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. Follow Kyle on Twitter @KyleEslick!

  1. Emmanuel says:

    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

  2. Kyle Eslick says:

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

  3. Richard H says:

    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.

  4. Yan says:

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

  5. Hariharakumar says:

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

  6. Mike Kubrisck says:

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

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

  8. Raj says:

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

  9. Jignesh says:

    Thats Amazing….


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

  11. Faozul Azim says:

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

Trackbacks/Pingbacks »

  1. Imprimir un post en WordPress | docs4beto says:
  2. Wordpress Hacks, Guides and Tricks | TechnoBuzz.net says:
  3. WordPress ?? ??? ??? snippet says:
  4. Top 30 Most Wanted Wordpress Tricks and Hacks | Make Money Blogging Experiment says:
  5. 100+ Killer Wordpress Resources | Steffan Antonas' Blog says:
  6. 22 Mixed Quality Wordpress Hacks | KolayOnline says:
  7. 70 Very Useful Wordpress Hacks & Tricks » De Web Times - Sharing Useful Resources. says:
  8. Wordpress’te ??inize Yarayabilecek 10 Tane Kod Bütünü | Desmal.Org | Desmal Ye?ilmen ?nternet | Program | Seo | Gündem.. says:
  9. 37 Cool Wordpress Hacks And Tutorials You Should Try | Afif Fattouh - Web Specialist says:
  10. 37?Wordpress???? | ??? says:
  11. 10 codes les plus utilisés dans Wordpress | Junksource says:
  12. 37 Cool WordPress Hacks And Tutorials You Should Try : Web design says: