How do I properly link a print style sheet? All my styles have been enqueued through functions file.

The codex suggested I put the link in the header but this didn't work, is there a core print stylesheet?

I tried to create a link in the header but I see any of these styles? I do see the print.css file in the header when I look at the source.

/css/print.css" type="text/css" media="print" />

1 Answer 1


Use wp_enqueue_style to add a print stylesheet, note the media parameter that lets you make it a print-specific stylesheet:

function wpa_print_styles(){
        get_stylesheet_directory_uri() . '/print-style.css', 
        'print' // print styles only
add_action( 'wp_enqueue_scripts', 'wpa_print_styles' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.