Title: WP Print Friendly
Author: Erick Hitter
Published: <strong>2011 年 5 月 20 日</strong>
Last modified: 2026 年 1 月 19 日

---

搜索插件

![](https://s.w.org/plugins/geopattern-icon/wp-print-friendly.svg)

# WP Print Friendly

 作者：[Erick Hitter](https://profiles.wordpress.org/ethitter/)

[下载](https://downloads.wordpress.org/plugin/wp-print-friendly.0.6.4.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-print-friendly/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-print-friendly/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-print-friendly/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-print-friendly/#developers)

 [支持](https://wordpress.org/support/plugin/wp-print-friendly/)

## 描述

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.

**IMPORTANT**: There are certain plugins that may interfere with this plugin’s functionality.
See the **FAQ** for more information.

## 安装

 1. Upload wp-print-friendly.php to /wp-content/plugins/.
 2. Activate plugin through the WordPress Plugins menu.
 3. Navigate to Options > Permalinks and click _Save Changes_ to update navigation.

## 常见问题

### Print links don’t work

First, navigate to Options > Permalinks in WP Admin, click _Save Changes_, and try
again.

If clicking on a print link takes you back to the post or page where the link appeared,
see the **Known Plugin Conflicts** item below.

If, after reviewing the remaining FAQ, you are still experiencing problems, visit
[http://www.thinkoomph.com/plugins-modules/wp-print-friendly/](http://www.thinkoomph.com/plugins-modules/wp-print-friendly/)
and leave a comment detailing the problem.

### How should I name print templates?

Print templates should be prefixed with _wpf_ and follow WordPress template conventions
from there. To use one template for all contexts unless otherwise specified, name
your template _wpf.php._

For both built-in and custom post types, _wpf-[post type name].php_ will be used
for that post type. To use a template for a single post type object, name your template
_wpf-[post type name]-[slug].php_.

For custom taxonomies, follow the naming conventions for post types.

Similarly, _wpf-home.php_ will load that template for the front page of your site.

The plugin also includes a default template that may suit many needs.

### How do I add a print link to my templates?

The function `wpf_the_print_link` will add a link to the print-friendly version 
of whatever page it appears on. This function accepts the following arguments:

 * **$page_link**: Set to true to add a link to the current page in a paged post
   in addition a to a link for the entire post.
 * **$link_text**: Set to text that should appear for the print link. Defaults to
   _Print this post_.
 * **$class**: Specifies the CSS class for the print link. Defaults to _print\_link_.
 * **$page_link_separator**: If $page_link is true, specifies what separator will
   appear between the print link for the entire post and the print link for the 
   current page of the post.
 * **$page_link_text**: If $page_link is true, specifies what text will appear for
   the print link for the current page. Defaults to _Print this page_.
 * **$link_target**: If set to “new”, print links will open in a new window.

### Known Plugin Conflicts

This plugin is known to conflict with certain plugins, many pertaining to SEO and
permalinks. Conflicting plugins include, but are not limited to, the following:

 * **WordPress SEO by Yoast:** This plugin’s `Permalink` options, particularly _Redirect
   attachment URL’s to parent post URL_ and _Redirect ugly URL’s to clean permalinks.(
   Not recommended in many cases!)_, interfere with WP Print Friendly’s ability 
   to display print templates. Both must be disabled, and the site’s rewrite rules
   regenerated (by visiting Options > Permalinks and clicking _Save Changes_), for
   WP Print Friendly to function.

## 评价

![](https://secure.gravatar.com/avatar/7b62eebd4b74a5ee3eea024fe14c303977d73d96dad48b8094672ddeafee5e89?
s=60&d=retro&r=g)

### 󠀁[works very well on my wp 5.0.3](https://wordpress.org/support/topic/works-very-well-on-my-wp-5-0-3/)󠁿

 [harimayco](https://profiles.wordpress.org/harimayco/) 2019 年 2 月 4 日

just add parameter “print=1” to url and the plugin work as expected.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/)

## 贡献者及开发者

「WP Print Friendly」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Erick Hitter ](https://profiles.wordpress.org/ethitter/)
 *   [ Steven Word ](https://profiles.wordpress.org/stevenkword/)
 *   [ Oomph, Inc. ](https://profiles.wordpress.org/thinkoomph/)

「WP Print Friendly」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/wp-print-friendly/contributors)
为本插件所做的贡献。

[帮助将「WP Print Friendly」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-print-friendly)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-print-friendly/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wp-print-friendly/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wp-print-friendly/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-print-friendly/)。

## 更新日志

#### 0.6.4

 * Fix translation support.

#### 0.6.3

 * Fix translation support.

#### 0.6.2

 * PHP 7.3 compatibility.

#### 0.6.1

 * Security update: correct misuse of `add_query_arg()` as identified by Sucuri:
   https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-
   multiple-wordpress-plugins.html.

#### 0.6

 * Revert security hotfixes made in 0.5.3 and address the vulnerabilities in the
   WordPress way.
 * If current user can’t read a private post, don’t display the print template, 
   allowing the standard theme to handle requests.
 * If a post is password protected and the viewer hasn’t provided the right password,
   display the password form and prevent plugin from exposing any information about
   the post that WordPress doesn’t already.
 * When WordPress determines a request is a 404, don’t activate the plugin’s templating
   functionality.
 * Convert the plugin to a singleton.
 * Audit entire plugin for translation readyness.
 * Correct phpdoc.

#### 0.5.3

 * Creates is_protected() method to determine if the print page should be visible
   to the current user
 * Correct security vulnerability allowing both private and password protected posts
   from being accessed through the print page
 * Remove print_url links from the content when the current user does not have the
   necessary capabilities to view the print page

#### 0.5.2

 * Revert change in is_print() method made in version 0.5 as it breaks the method
   when no page number is specified. See [https://github.com/ethitter/WP-Print-Friendly/issues/2](https://github.com/ethitter/WP-Print-Friendly/issues/2).

#### 0.5.1

 * Correct construction of query needed in situations where verbose page rules are
   required.

#### 0.5

 * Add additional rewrite rules for situations where verbose page rules are required.
 * Disable canonical redirect when print template is requested.
 * Update is_print() method to use WordPress API.
 * Correct translation string implementation.
 * Update code to better conform to WordPress Coding Standards.

#### 0.4.4.1

 * Remove unnecessary query_var filter.

#### 0.4.4

 * Full support for child themes.
 * Expand template choosing to fully support WordPress template hierarchy as described
   at [https://codex.wordpress.org/Template_Hierarchy](https://codex.wordpress.org/Template_Hierarchy).
 * Simplify rewrite rules creation.

#### 0.4.3.3

 * Correct error that would display wrong page’s content when printing a single 
   page of a paged post.
 * Correct error in link generation for page-specific print links.
 * Increase compatibility with View All Post’s Pages plugin.

#### 0.4.3.2

 * Resolve PHP notice in options retrieval.
 * Add compatibility with View All Post’s Pages plugin (release forthcoming).

#### 0.4.3.1

 * Fix bug in options retrieval that caused print links to be added to default post
   types if no post types were selected.
 * Resolve PHP notice when using default permalinks.

#### 0.4.3

 * Fix bug in page number function.
 * Rewrite endnote link processing, including a refined regex pattern.
 * Introduce class property for print slug.
 * Correct minor bug in print link generation.
 * Add canonical link attribute and nofollow declaration to default template.

#### 0.4.2.2

 * Correct generation of custom post type rewrite rules.

#### 0.4.2.1

 * Version 0.4.2 omitted the default template.

#### 0.4.2

 * Correct page rewrite rules to accomodate situations necessitating verbose rules,
   such as when the permalink structure starts with `%postname%`. Thanks to Wes 
   Herzik at ikonic for discovering and reporting this issue.

#### 0.4.1

 * Fix bug that displayed post links automatically on the wrong post types.

#### 0.4

 * Child pages now fully supported.
 * Generates and registers rewrite rules more efficiently.
 * Rewrite setting for all post types and taxonomies are now considered when adding
   print support.
 * Add option to disable endnotes representing links found in content.
 * Move copyright and other static elements from content filters to default template.
 * Add function to display page numbers when printing single page of post.
 * Options page is now fully translation-ready.
 * Notices are translation-ready.
 * Correct various other bugs, including many related to non-standard permalink 
   structures, custom post types, and custom taxonomies.

#### 0.3.2

 * Add option to open print-friendly views in a new window.

#### 0.3.1

 * Correct PHP error in `is_print()`.

#### 0.3

 * Initial version.

## 额外信息

 *  版本 **0.6.4**
 *  最后更新：**4 月前**
 *  活跃安装数量 **500+**
 *  WordPress 版本 ** 3.1 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/wp-print-friendly/) 和 [English (US)](https://wordpress.org/plugins/wp-print-friendly/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/wp-print-friendly)
 * 标签
 * [print](https://cn.wordpress.org/plugins/tags/print/)[printable](https://cn.wordpress.org/plugins/tags/printable/)
   [printer](https://cn.wordpress.org/plugins/tags/printer/)[template](https://cn.wordpress.org/plugins/tags/template/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-print-friendly/advanced/)

## 评级

 3.5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/?filter=3)
 *  [  1 条 2 星评价     ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/wp-print-friendly/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-print-friendly/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-print-friendly/reviews/)

## 贡献者

 *   [ Erick Hitter ](https://profiles.wordpress.org/ethitter/)
 *   [ Steven Word ](https://profiles.wordpress.org/stevenkword/)
 *   [ Oomph, Inc. ](https://profiles.wordpress.org/thinkoomph/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-print-friendly/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.thinkoomph.com/plugins-modules/wp-print-friendly/)