WP Print Friendly for WordPress
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.
Sorry, I’ve got this configured correctly and still not working.
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/
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
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?
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
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.
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
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.
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
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?
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
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?
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
Is there a post/site that shows this plugin in action?
Victoria,
I’ve installed the plugin as a demonstration at http://www.ethitter.com/2012/02/how-to-scale-wordpress-wordpress-phoenix/.
Erick
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.
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
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?
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
LJ,
Version 0.5.2, released this morning, should resolve this problem.
Erick
Version 0.5.2 just resolved the problem! Thank you so much!
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.
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
Hi,
Has this issue been fixed?
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!
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.
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
Sorry, I’ve got this configured correctly and still not working.