WP Print Friendly  for

Extends WordPress’ template system to support printer-friendly templates for posts, pages, and custom post types. Uses WP standard template naming to support templates on a post-type basis. Supports printing paged posts on single page. Adds nice URLs for printer-friendly pages.

The plugin comes bundled with a basic print template that will likely suit many needs.

To take advantage of its templating capabilities, add a file named wpf.php to your theme. From there, you can use any existing WordPress functions to generate your print view. To create a custom print template for your homepage, add wpf-home.php to your theme. From there, standard WordPress template naming conventions are followed, so wpf-[custom post type name].php or wpf-[custom taxonomy name].php would be invoked for your custom post type and custom taxonomy, respectively.

To add a print link to your templates, you can either let the plugin add it automatically via the settings available under Options > WP Print Friendly, or you can use this function: wpf_the_print_link( $page_link, $link_text, $class, $page_link_separator, $page_link_text );. The optional parameters are as follows:

  • $page_link: Set to true to include a link to the current page of a paged post. To exclude this link, set to false.
  • $link_text: Sets the text for the print link for the post’s full content. Defaults to “Print this post.”
  • $class: CSS class for the print links. Defaults to “print_link.”
  • $page_link_separator: Specifies how the full-post and page-specific print links should be separated. Defaults to ” | “.
  • $page_link_text: Sets the text for the page-specific print link. Defaults to “Print this page.”
  • $link_target: If set to “new”, print links will open in a new window.

106 Thoughts Contributed to “WP Print Friendly”

  1. Josh McCoy - January 31, 2012 at 11:54 am Reply

    Sorry, I’ve got this configured correctly and still not working.

  2. Marmy - February 1, 2012 at 4:13 am Reply

    Hi Erick! I’ve encountered a problem with too big printer icon (but only in the newest post) http://imageshack.us/photo/my-images/714/pficonproblem.jpg/

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:15 pm

      Marmy,

      This plugin doesn’t include any icons, so I can’t provide any guidance as to where the icon is originating from or why it is so large.

      Erick

  3. Sherry - February 13, 2012 at 6:26 pm Reply

    Hi — I’d like to use this plugin on my posts but it adds a print button to the all of the ‘widget content’ plugins on my post pages as well. Any way to get around that?

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:17 pm

      Sherry,

      Rather than using the “display automatically” option, you should add the wpf_the_print_link() function to your template where you’d like the buttons to appear. Documentation for this function is found in the readme.

      Erick

  4. Tom Stynes - February 14, 2012 at 2:21 pm Reply

    I just downloaded the WP Print Friendly plugin. It’s not producing the outcome I was expecting. I’ve deactivated the plugin, yet the links are still present in pages and posts. Are there additional steps I must follow to completely remove the plugin? Thank you for your time.

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:18 pm

      Tom,

      If the plugin is deactivated, the links should no longer appear. Based on what you’ve described, you must be running some sort of caching that is retaining the links. Clearing any caches should resolve this problem.

      Erick

  5. Clare - March 15, 2012 at 9:49 am Reply

    Hi,

    I’m a newbie, know no php. Using Printfriendly for all my pages. Like it, very easy to get working. Thanks!

    Wondering when the shortcode for a single page might be available?

    Now just started playing with bbpress as a plugin on my site for a forum, and finding that the Printfriendly button is appearing at every forum entry in the forums list on the forums page. Looks peculiar, to say the least. Since I really only need a few pages to be printable, and I don’t want to dig down into the bowels of php and understand it, the shortcode would be a really useful option.

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:21 pm

      Clare,

      At this time, I don’t have an expected release that will include a shortcode. I’ll be sure to mention this feature in the release notes when I do implement it.

      Erick

  6. bruno - March 20, 2012 at 11:53 pm Reply

    Hi I installed and used the Wp PF and work’s fine. But now I want transform my print pages on PDF. Can I? what Ineed to do?

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:21 pm

      Bruno,

      My plugin offers no such support, though I imagine that if you searched the WordPress.org plugins repository, you might find something that meets your needs.

      Erick

  7. Pat - April 5, 2012 at 4:38 pm Reply

    I have the plugin working. And im using pages not posts. I have 5 main pages including home and a contact us page and etc. The problem is i don’t need the home page to display a printer friendly link but still need it displayed on my menus pages. How do i control what pages specifically show the printer friendly link?

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:22 pm

      Pat,

      Per-page control isn’t currently supported via the plugin’s options panel. To do so, you’ll need to modify your theme by adding the wpf_the_print_link() function where you’d like the print links to appear. Documentation for that function is found in the plugin’s readme.

      Erick

  8. Victoria Gabaldon - April 18, 2012 at 4:19 pm Reply

    Is there a post/site that shows this plugin in action?

  9. leeuniverse - April 28, 2012 at 4:56 pm Reply

    Hey, could you ASAP add…..

    1. Selecting a “Print Image” Instead of Text

    2. “Align Right” of Image/Text

    Thank you for your simple working plugin. :)

    • Erick Hitter
      Erick Hitter - May 29, 2012 at 9:30 pm

      Both of these requests are better addressed via your theme and a custom print friendly plugin. The plugin’s readme provides guidance for implementing both.

      Erick

  10. LJ - June 4, 2012 at 10:07 am Reply

    Hello! I just downloaded the update, and now, instead of creating a print-friendly version of my posts (without sidebars and menus), all it does is open the exact same page, with nothing changed (sidebars and menus appear). Any ideas why?

    • Erick Hitter
      Erick Hitter - June 4, 2012 at 10:30 am

      LJ,

      First, have you refreshed your permalinks by going to Settings > Permalinks?

      Second, what permalink structure are you using? Yesterday’s update resolved a problem with certain permalink structures, but additional changes could be needed for similar reasons.

      Thanks,
      Erick

    • Erick Hitter
      Erick Hitter - June 4, 2012 at 10:50 am

      LJ,

      Version 0.5.2, released this morning, should resolve this problem.

      Erick

    • LJ - June 4, 2012 at 11:08 am

      Version 0.5.2 just resolved the problem! Thank you so much!

  11. kilzac - June 15, 2012 at 11:45 am Reply

    Hi,

    When i upgraded your plugin to version 0.5.2, the print link for Pages do not work when the permalink is set to /%postname%/. it will show a blank page with just the Header and Footer of the default print template, and the page title as Page not found.

    So i revert to version 0.4.3.3 and it solves the mentioned problem with Pages. everything is fine for Posts though. you should look into this issue.

    • Erick Hitter
      Erick Hitter - June 20, 2012 at 9:51 am

      I’m looking into this problem. The trouble arises from the ambiguous permalink structure, which makes it challenging for WordPress and my plugin to identify the content requested.

      Erick

    • Kilzac - January 21, 2013 at 4:02 am

      Hi,

      Has this issue been fixed?

  12. Nicholas Levis - April 23, 2013 at 4:20 pm Reply

    Great plug-in. I just discovered that it circumvents password protection, however. WP allows you to set up password protected pages, but below the field for password these will still display “Print format” (as I call the WP Print link). Click on that and you see the page. (The share buttons do not reveal the contents of the protected page.) Here, have a look: http://www.akny.org/test/ – Any idea if this can be fixed? Is it possible to incorporate exception code through the editor? Thank you!

    • Steven Word - April 25, 2013 at 12:12 pm

      Thank you very much for identifying this security issue and bringing it to our attention. I have resolved these problems in version 0.5.3. You can download the new version here: http://wordpress.org/extend/plugins/wp-print-friendly/ or update the plugin directly from the installed plugins page in wp-admin.

  13. Erick Hitter
    Erick Hitter - December 29, 2011 at 7:08 am Reply

    Josh,

    Do you happen to be using an SEO plugin? If so, which one?

    Increasingly, particularly with WordPress 3.3, users are reporting conflicts with SEO plugins that attempt to clean up URL structures. Often, resolving the conflict means simply disabling an option in the SEO plugin. The problem, generally, is that the SEO plugins aren’t respecting WordPress’ method for adding custom rewrite rules (which this plugin adds to support /print/ URLs), instead only accounting for standard rewrite rules.

    Erick

  14. Josh McCoy - January 31, 2012 at 11:54 am Reply

    Sorry, I’ve got this configured correctly and still not working.

What do you think?

(required)

Oomph is a full-service digital agency providing strategy, design & development and a host of other web services. A leader in WordPress and Drupal implementation, Oomph pushes the boundaries of today’s web platforms. Oomph has a diverse portfolio of non-profits, international corporations and publications. Team Oomph is always thinking creatively about the digital world. Oomph is located in Providence and Boston.