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.
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.
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.
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.
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:
Below this line, you need to add the following code where you want to display the print button:
Thatβs all, you can now visit your website and you will be able to see the print button.