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.















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
“This plugin generates a new page, with only the post.”
Isn´t this the problem? Duplicate content…?
@ 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.
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.
I’m glad that I look no further for a plugin that would print only the post and not the entire page.
Great code man. Really awesome. I will add PRINT button to my blog. Thanks u very much.Your blog rocks.
Really awesome. I will know if i can add a icon.
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).
Very helpful code and its great way to explain with the live code