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;
    }

    Thread Starter carrimak

    (@carrimak)

    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.