How to Add a Printer Friendly Option to Your WordPress Posts

Often users want to print articles they find interesting. By default, WordPress itself and most WordPress themes would print your page as it is, with all the graphics, colors, and text in sidebars. In this article, we will show you how to add a printer… Read More »

The post How to Add a Printer Friendly Option to Your WordPress Posts appeared first on WPBeginner.

Often users want to print articles they find interesting. By default, WordPress itself and most WordPress themes would print your page as it is, with all the graphics, colors, and text in sidebars. In this article, we will show you how to add a printer friendly option to your WordPress posts.

Adding a printer friendly option to WordPress posts

Why and When You Need a Printer Friendly Option for WordPress Posts?

Some WordPress themes come with a separate CSS stylesheet for printing. This stylesheet is used when a user prints a page. Other WordPress themes, may not change your site’s appearance when a user prints it.

Usually this results into users printing all the images, sidebars, headers, menus, etc. Most of the time it is not very pleasant to read or look at.

A typical print preview with sidebars forms all printed

You can see how your WordPress theme handles print by pressing CTRL+P when looking at a page from your site. Your browser will show print preview of your site.

If your theme shows your site as it appears in the browser, then it is not handling print any differently.

In that case, you can use a printer friendly option on your WordPress site. It will not only make your content printer friendly, it will also encourage users to print with an on-screen print icon.

We will be showing you two plugins that can add a print option to WordPress, and you can choose the one that best suits your need.

Method 1: Add Print Button in WordPress with Print Post and Page Plugin

This method is recommended for users who do not want to add code to their WordPress theme files.

First thing you need to do is install and activate the Print Post and Page plugin.

Upon activation the plugin will add a new menu item labeled ‘Print’ to your WordPress admin bar. Clicking on it will take you to the plugin’s settings page.

Print settings

Here you can choose the print icon size and color, text to accompany the icon, and print alignment. Optionally, you can add custom CSS that you want to include into your print template.

Don’t forget to click on the ‘Save and Activate’ button to store your plugin settings.

You can now visit your WordPress site and you will see a print button on your single posts.

Print button in WordPress post

However, the plugin does not automatically adds print button to your WordPress pages. You will need to add [printicon align="left"] shortcode to your WordPress pages to display the print icon on pages.

Method 2: Adding Printer Friendly Option Using WP-Print

First thing you need to do is install and activate the WP-Print plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Print to configure plugin settings.

Print Options

You can display print icon with text, just the icon, or just the text. You can choose between two icons, and you also change the text that appears with the icon.

Under print options, you will be asked if you want to print comments, links, images, or videos. By default, the plugin does not print comments and videos. You can change that if you want the plugin to print comments and videos as well.

At the bottom of each printed post, the plugin will add a disclaimer/copyright text. By default, it will show your site’s name. You can change that to anything you want, and you can also use HTML tags inside the disclaimer field.

Don’t forget to click on the save changes button to store your settings.

Now comes the tricky part. The plugin will not actually add the print button into your posts. You will have to manually edit your WordPress theme files to add the button.

Depending on your theme, you may need to add the code into single.php, page.php, archive.php, content.php, etc.

Locate the line in your theme template that looks like this:

<?php while (have_posts()) : the_post(); ?>

Below this line, you need to add the following code where you want to display the print button:

<?php if(function_exists('wp_print')) { print_link(); } ?>

That’s all, you can now visit your website and you will be able to see the print button.

Print this button

Sometimes you may have content that you do not want to be included into the print version. Simply wrap that content between [donotprint] and [/donotprint] shortcode, like this:

[donotprint]This text will not be displayed when printing[/donotprint]

We hope this article helped you add a printer friendly option to your WordPress posts. You may also want to see our guide on how to add PDF download for posts in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add a Printer Friendly Option to Your WordPress Posts appeared first on WPBeginner.

How to Add a PDF Download for Posts in WordPress

Do you want to add a PDF download for your WordPress posts? Recently one of our readers asked if there was an easy way to turn WordPress posts into PDF. In this article, we will show you how to add a PDF download for posts… Read More »

The post How to Add a PDF Download for Posts in WordPress appeared first on WPBeginner.

Do you want to add a PDF download for your WordPress posts? Recently one of our readers asked if there was an easy way to turn WordPress posts into PDF. In this article, we will show you how to add a PDF download for posts in WordPress.

Adding PDF download option for WordPress posts

Why Add a PDF Download Option for Posts in WordPress?

PDF allows you to share documents among different devices and operating systems.

It ensures that the contents of document are printed in the same way on different platforms. This makes PDF files ideal for printing documents.

A PDF download option with your posts allow users to save your content on their computers and print it when they want.

Some types of content are printed more frequently like recipes, music sheets, mathematical equations, etc.

You can also use the PDF download to create content upgrades for your posts to grow your email list.

Having said that, let’s see how you can add a PDF download for WordPress posts.

Adding PDF Download Option for WordPress Posts

First thing you need to do is install and activate the WP Advanced PDF plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » WP Advanced PDF page to configure the plugin settings.

Advanced PDF settings

First you need to select where you want to display the PDF download option. Front-end (your website’s public area) or in the admin dashboard.

Under the availability section, you can select whether you want downloads to be available for everyone or just registered users.

Next, click on the General tab to expand it. There you can select post types, file name formats, and other general settings.

Under the button positioning section, you can select the button alignment and placement. You can use the default button that comes with the plugin, or you can upload your own button image.

Body, Header, and Footer sections allow you to fine tune these sections of your PDF downloads. You can add custom text, choose fonts, add custom CSS, etc.

WP Advanced PDF also comes with watermarking feature. This allows you to add watermark on your PDF files to protect them from unauthorized distribution.

This plugin offers a comprehensive set of options. The default options would work for most websites, but you can review them and adjust them as needed.

Don’t forget to click on the save changes button to store your plugin settings.

You can now visit any single post on your website, and you will see a PDF download icon. Clicking on it will start the PDF download.

PDF Download

We hope this article helped you add a PDF download option for posts in WordPress. You may also want to see our comparison of the 5 best WordPress membership plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add a PDF Download for Posts in WordPress appeared first on WPBeginner.