Guide to Making Your WordPress Posts and Pages Print-Friendly

July 1, 2010  | 
13 Comments

Having a “Print Page” button is especially important for WordPress sites used for education, course management, online magazines, project management, news sources, or any other informational site. The ability to easily print pages can have a significant impact on your reader’s experience with your website.

How frustrating is it to want to print a page from a site that has no print view? You either have to print a full page of ink or copy the relevant text into a document and print from there. This is very inconvenient and does nothing to promote your brand.

How to Add a Print Page Button to Your WordPress Theme

If you have a fairly minimalistic theme design and simply want to add a “Print Page” button to your posts or pages, just drop this snippet anywhere you want in your template files:

<script language="JavaScript">
  if (window.print) {
  document.write('<form> '
  + '<input type=button name=print value="Print Page" '
  + 'onClick="javascript:window.print()"></form>');
  }
</script>

Source: WP Special

However, if you really want to improve your user’s experience, you may want to add in a few more features than just the button to launch the printer. You can, of course, add print styles to your theme’s stylesheet, but this can get very tedious. If you want an easier way to accomplish this, skip to the plugin option below.

Plugin Option for Adding a Print Button to Posts and Pages

WP-Print

WP-Print will enable you to add a “Print This Page” button to your posts and pages with a small icon and a number of dashboard options: edit the print text link, select an icon, and decide wither or not you want to print individual items, such as comments, links, images, videos and a custom copyright text. When you click on the print button, you’ll be redirected to a print-friendly version of your post or page.

If you want to further customize how your print pages look, you can edit the print-css.css file included with the plugin. Change the text color, add a logo, change the width, and brand it for your site.

If you’re having trouble getting the print button to show up using the WordPress 3.0 2010 theme, you can add its template tag to the single.php or page.php:

<?php if(function_exists('wp_print')) { print_link(); } ?>

Adding easy printing capabilities may not be necessary for every site, but it certainly adds a touch of professionalism. Content printed from your website goes places that your site cannot go. Give your online presence some legs with a well-designed print page.

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

13 Responses to Guide to Making Your WordPress Posts and Pages Print-Friendly

  1. Another cool print button for WordPress is PrintFriendly. http://wordpress.org/extend/plugins/printfriendly/

    It opens in a lightbox, so readers don’t get taken to a new page, plus has some cool features like save as PDF, and click to remove images/content.

    I built PrintFriendly, so I might be biased ;)

  2. Excellent. Is it compatible with WP 3.0?

  3. Yes indeed. It’s compatible with WP 3.0.

  4. Great! Wish I had known about it before I wrote the post. I’ll give it a try to check it out :)

  5. Pingback: Guide to Making Your WordPress Posts and Pages Print-Friendly

  6. When installing WP-Print 2.5 on WP 3.0 multisite, the options page for every subsite redirects back to the root site.

    I believe I have read about the need for an MU-specific function to be added to plugins so they’ll work with “Network activate” in 3.0.

    However, WP-Print is no longer being supported by the developer. Also, Print Friendly looks good, but conflicts with my theme (Thematic).

    Are there any other print view options that strip out screen code? (Using a print css sheet is fine, but that leaves a lot of navigational code in the page.

  7. @Jay Send me the URL to your site, I’ll take a look and see if there’s anything we can do.

    My email is “taylor at printfriendly.com”

  8. Will do. Thanks.

  9. Printer-friendly was showing adverts when you go to print the page so please check the wordpress page before using the plugin. I went to use to and then had to remove it from my clients non-for-profit site.

    Thanks for tip with wp-print since I hadn’t been installing it properly and so couldn’t get it to work.

  10. rhigimmrhbsydirhjbgq, delo, mJLysaU.

  11. Cool article. Very interesting.

  12. Pingback: Print Pretty With the Free Joliprint Plugin For WordPress - WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org

  13. Could you display a print page button without using JavaScript? I would like to use the most lightweight approach possible.

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting