Issue with Print CSS

  • Anonymous

    #6614

    Not sure if the WordPress theme is designed to print the “posts” page with the Print CSS or not.

    Here’s the issue:

    When printing single posts, the CSS is fine. It prints out the header image of the site, the site name, the page information and the content, all with formatting.

    When printing the “posts” page, it does not print correctly.

    It prints the header image, then the site name, then the site navigation in expanded form, then the search box, then goes onto the posts. The text is not formatted correctly either in some parts (headers and stuff).

    Prasanna SP

    #35070

    Print style sheet is enqueued on single posts and pages only. That’s why it doesn’t print “posts” page correctly. To enable print css for non singular pages such as blog page or archives, go to Graphene Options –> Print Options and uncheck Enable print CSS for single posts and pages?. Then add this function to your child-theme‘s functions.php file

    <?php
    function custom_enequeue_function() {
    if ( ! is_admin() ){
    wp_enqueue_style( 'graphene-print' );
    }
    }
    add_action('wp_enqueue_scripts', 'custom_enequeue_function');
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.