Support » Theme: Blue Planet » Need to make pages look good when printing

  • Resolved carrimak

    (@carrimak)


    Hi: I am using Blue Planet as a theme for a simple website for a local health district. Everything is coming along fine (we’re still in development) except I can’t find out how to make pages look “pretty” when printing. I followed the directions in this page: http://codex.wordpress.org/Styling_for_Print

    But can’t find anything linking to CSS files in the header.php template file.

    If you want to see how the site looks now; you can see it on my development server at: http://www.sitescaping.com/wwhd2014/

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Nilambar Sharma

    (@rabmalin)

    You can copy this code for adding stylesheet for printing.

    function bp_child_custom_printing_styles() {
      ?>
      <link rel="stylesheet" type="text/css" media="print"
        href="<?php echo get_stylesheet_directory_uri(); ?>/print.css" />
      <?php
    }
    add_action( 'wp_head', 'bp_child_custom_printing_styles' );

    Add print.css file in your child theme.

    Theme Author Nilambar Sharma

    (@rabmalin)

    Sample CSS file for printing.

    body {
      font-family: Georgia, serif;
      background: #fff none !important;
      color: black;
    }
    #page a[href]:after {
      content:none;
    }
    #wrap {
      clear: both !important;
      display: block !important;
      float: none !important;
      position: relative !important;
    }
    #main {
      display: inline;
    }
    #secondary,
    #comments,
    .nav-links,
    .edit-link,
    #respond{
      display: none;
    }

    Thanks. Found a plugins that’s working well for me at the moment so may continue with that for a while. But this is good info to have.

    carrimak

    Theme Author Nilambar Sharma

    (@rabmalin)

    Ok, have a great time. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need to make pages look good when printing’ is closed to new replies.