A good use of style sheet.

I often print an article to keep a copy. I use most of the time a “see before printing” to select the pages I want to print. But I’ve remarked that 50% of the printing area is employed with publicities or menus.

When we create the design of a site we foresee an area for menus, for publicity and sometimes others specific areas to boost the look and the ergonomic of the site.
These areas useful for the navigation become a pain for the printing of the article. However it is very simple to handle this problem if you use the style papers.CSS.

In an ecological wish (it’s tendance) but also to have a “cleaner” printed text, I am going to explain you how to adapt your WP theme to print correctly.

Structure ecran d'un site
Structure ecran d'un site

Modifications for WordPress

WordPress, like all the blog or CMS motors, use style papers to make easier the adpatation of the presentation. Also it is quite simple to adapt your theme, if it doesn’t permit it. In my case the adpatation took me less than one hour. Here is the modifications to make :

  • print.css : creation of the specific style paper for the printing – It is a minimum version I only use the ID No Print that I hide for the impression, you can make it richer to modificate the margins, the size of the police and many other things.

    * #NoPrint {
    display: none;

  • header.php : Add of the style papers “media” for the print.

    <link rel=”stylesheet” type=”text/css” media=”print” href=”<?php bloginfo(‘template_url’); ?>/print.css” />

  • index.php, page.php, … : Modification of many pages in the theme to add a – id=”NoPrint” – to the elements i don’t want to print.


I propose you to download the last version of the theme Rbl-Illacrimo which includes the support of the printing.

Rbl – Illacrimo – Français

Rbl – Illacrimo – English

Be Sociable, Share!