Order Categories and all custom taxonomies terms (hierarchically) using a Drag and Drop Sortable JavaScript capability.
About WP-Print
To set up the WP-Print plugin, go to the WP-Print settings page in your WordPress admin panel and then regenerate the permalinks. Refer to the usage instructions to add the print link to your theme's index.php or other relevant files. You can also customize the text for printing posts and pages in the plugin settings or embed the print link into specific posts/pages using the [print_link] shortcode.Screenshots



Frequently asked questions
How do I set up WP-Print after installation?
After installation, navigate to WP-Admin -> Settings -> Print for plugin settings. You also need to re-generate permalinks by going to WP-Admin -> Settings -> Permalinks and clicking 'Save Changes'.
How do I display the print link on all posts/pages?
To display the print link on all posts/pages, add <?php if(function_exists('wp_print')) { print_link(); } ?> below <?php while (have_posts()) : the_post(); ?> in your theme's index.php, single.php, post.php, and page.php files.
How can I customize the text for the print link?
You can set the text for printing posts and pages in 'WP-Admin -> Settings -> Print'. Alternatively, you can pass the text as arguments to the print_link() function, for example, print_link("Print Post", "Print Page").
How do I display the print link only on specific posts or pages?
If you do not want the print link to appear on every post/page, do not use the PHP code in your theme files. Instead, type [print_link] into the content of the selected post or page.
Changelog
3.0.0
- FIXED: A password-protected post printed its featured image. The body, the comments and the comment count were all withheld, but
get_the_post_thumbnail()makes no password check of its own — which is why every classic core theme makes the test itself, and this template replaces the theme’s, so nothing was making it - FIXED: “Print Images” and “Print Videos” were defeated by a newline. The patterns had no
smodifier, so an<img>tag written across two lines, or an<iframe>with its closing tag on the next line — the ordinary shape of a hand-written or pretty-printed embed — survived being switched off, and the reader’s browser fetched it anyway. A bare<embed>was never stripped at all, because a closing tag was required and it is a void element. An<img>carrying only asrcsetis now stripped too - BREAKING: Requires WordPress 6.8 and PHP 8.2, up from 6.0 and 7.4.
- BREAKING: The settings move from the
print_optionsrow towp_print_options, andprint_db_versionis replaced bywp_print_version. Existing settings are migrated automatically on the first admin page load after upgrading. - BREAKING: The
Print_Admin,Print_Content,Print_Core,Print_Link,Print_OptionsandPrint_Templateclasses are renamedWP_Print_Admin,WP_Print_Content,WP_Print,WP_Print_Link,WP_Print_OptionsandWP_Print_Template. - BREAKING: The Print Icon setting and the two bundled GIFs are gone, replaced by one inline SVG. A custom link template using
%PRINT_ICON_URL%is rewritten to%PRINT_ICON%automatically. - BREAKING: Print Text Link For Post, Print Text Link For Page and Print Text Link Style are gone. The print link is one HTML template with a new
%POST_TYPE%placeholder, and existing settings are converted into it automatically.%PRINT_TEXT%is retired, and the first two arguments toprint_link()no longer do anything. - BREAKING:
print-css-rtl.cssis deleted. The one stylesheet now serves both text directions. - BREAKING: A theme’s copy of
print-posts.phpneedsclass="wp-print"on its<body>tag to pick up the new stylesheet. - NEW: The print icon is an inline SVG that inherits your theme’s link colour and stays sharp on any screen.
- NEW: The printable page has a dark mode for reading it before printing, and prints as ink on white either way.
- NEW: The stylesheet is tunable through CSS custom properties rather than by forking it.
- NEW:
wp_print_capabilityfilters the capability the settings screen requires;wp_print_allowed_htmlfilters the tags the printed document may carry. - NEW: Rewritten as classes under
includes/, following the Plugin Handbook’s folder structure. - NEW: The settings screen is two tabs, Settings and Templates, over the same option row.
- NEW: The options screen now uses the WordPress Settings API. Its address changes from
options-general.php?page=wp-print/print-options.phptooptions-general.php?page=wp-print— the Settings -> Print menu item is unaffected, and there is now a Settings link on the Plugins screen. Update any bookmark. - NEW: No more jQuery. The settings screen and the print view use plain JavaScript, and every inline
onclickattribute is gone. - NEW: Print options are stored unslashed. An existing install is migrated once, automatically, on the first admin page load after upgrading.
- CHANGED: The printed document is filtered through
wp_kses()on its way out, keeping every tag a post body plausibly contains plus the ones embeds arrive in, and the field of the password form on a protected post.wp_print_allowed_htmlcovers anything it misses. - CHANGED: The print link is filtered through the plugin’s allow-list wherever it is emitted — the
[print_link]shortcode as well as theprint_link()template tag. A link template carrying a tag outside that list, or an inline event handler, loses it. - CHANGED: The print view no longer fetches a webfont from fonts.googleapis.com when the site is right-to-left.
- CHANGED: The third argument to
print_link()is named$display, matching the other template tags. Only a caller passing it by name is affected. - FIXED: A password-protected post printed its comments to anyone who visited its
/print/URL. The body was withheld and the comment count said Comments Hidden, and the thread printed in full underneath both. - FIXED: Numbered and bulleted lists in a post kept their indentation but lost their markers on the printed page.
- FIXED: Print options set before a key existed no longer produce “Undefined array key” warnings or a print link with no text and no icon.
- FIXED: The first link in a post was left unnumbered on themes that turn
wpautopoff. - FIXED: The category list separator lost its space, and
print_categories( $before, $after )wrapped the whole list instead of each category. - FIXED: The print view emitted
lang=""for locales without a region, such asca. - FIXED: Right-to-left detection in the comments template never triggered, and the print view raised a deprecation notice on every load.
- FIXED: Link URLs taken from post content are escaped when written back into the printable page.
- FIXED: An icon-only print link had no accessible name; it now carries one.
- FIXED: Uninstalling on a multisite network larger than 100 sites left the options behind on every site past the hundredth, and would fail outright on WordPress 5.1 or newer.
- NOTE: The
remove_image(),remove_video()andstr_replace_one()global functions are gone. They were undocumented and used names other plugins could collide with. - NOTE: Support for the Polyglot plugin is removed. It has not been available for over a decade.
- NOTE: Every documented template tag —
print_link(),print_content(),print_categories(),print_comments_content(),print_comments_number(),print_links(),print_can()— keeps its name, arguments and behaviour, and[print_link]and[donotprint]are unchanged. So is the/print/URL of every printable page. - NOTE: The comment attributions were assembled from separate translated words — “By”, the author, “On”, the date — and the thread heading from the comment count, “To”, and the title in ASCII quotes. Each is now one string with numbered placeholders, so a translation decides the word order and the quotation marks. Those msgids changed, so existing translations of them fall back to English until they are retranslated
