Print CSS for body only

  • Anonymous


    Is there an easy way to set up some CSS in the print configuration so only the body of a page is printed?

    ie. no widgets header footer etc


    Kenneth John Odle


    You can override the theme’s print.css file in a child theme, either by including some specific print information in the style sheet:

    @media print{

    #header {display: none;}


    or by enqueuing your own print stylesheet in your child theme’s functions.php file.



    Hi Kenneth. I meant where it says under ‘General > Print Options>Enable print CSS for single posts and pages?

    I ticked the box but where is the print CSS ?


    Kenneth John Odle


    It’s a separate file included with the theme. There aren’t any print.css options bundled with the theme, so if you want to make changes, you’ll need to use one of the methods I’ve outlined above.

    FYI, it helps to take a look at the theme’s print.css file first.

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.