Guide to Making Your WordPress Posts and Pages Print-Friendly

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:

1
2
3
4
5
6
7
<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:

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

Tags

Comments (13)

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

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

Participate