WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude stuff from the print template (3 posts)

  1. MultiformeIngegno
    Member
    Posted 2 years ago #

    Hello,
    I created a print.css file on the root of my stylesheet directory and I added the css in the header.

    Now: how can I exclude things from being printed?

    For example I added this in my footer.php:

    <br style="clear:both" />
    <div id="colophon2">
    <div style="padding-top:12px; text-align:center">
    <p>SOMETHING</p>
    </div>
    </div>

    I don't want it to be in the print page, how can I do this?

    I know that I could solve this putting the code on a footer widget, but unfortunately I can't use 'em for this.

    Thanks in advance!

    P.S.: WordPress 3.2.1 and theme is a child of TwentyTen.

  2. pete_voce
    Member
    Posted 2 years ago #

    With your print stylesheet, you're not keeping things from getting generated, you're only keeping them from being displayed. So in your print stylesheet you would want to add something like:

    #colophon2 {display: none;}
    or
    #colophon2 p {display: none;}

  3. MultiformeIngegno
    Member
    Posted 2 years ago #

    genius!

Topic Closed

This topic has been closed to new replies.

About this Topic