• Resolved altexasgirl

    (@altexasgirl)


    I want to configure my site so that it can be printed correctly. Currently, it prints, but it shows each individual section. For example, the sidebar, then the header, then the post content. Basically, I only want the post (Main content) section printing.

    I know it has something to do with the header template, but I’m not very good with the php/html codes.

    Thanks for the help. The site I’m working on is https://onthebaseline.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Basically you have to add a new <link ../> line t oyour header. Something like:

    <link rel="stylesheet" type="text/css" media="print" href="my_print_stylesheet.css"/>

    If your sidebar then has for example the id “sidebar” simply add following rule to the stylesheet to hide the sidebar

    #sidebar { display:none;}

    Thread Starter altexasgirl

    (@altexasgirl)

    Oh okay, great – but my theme does not have a print stylesheet. I’m using a custom theme and the designer did not include any print code in the stylesheet.

    Well, then you will have to do it yourself or ask your designer to do it for you ?? But it’s actually quite straight forward. Simply find the ids of the things you want to hide in the printview, add a display:none rule for these elements to the print stylesheet and then add the new stylesheet with the <link ../> line I’ve written above after the other stylesheet-links in the header ??

    Thread Starter altexasgirl

    (@altexasgirl)

    Great – thanks I’ll give it a try. Oh, and thanks for the help on the other thread too.

    you’re welcome ?? I hope it helps, but since I don’t have a Windows box around, all I can do is guess when it comes to IE-specific stuff ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Configuring Print Stylesheet’ is closed to new replies.