Linking to Print Style Sheet

cellis
9 Posts
cellis posted this 27 May 2016

Is there a way to effect the print styles? I have always just added my own style sheet for printing by adding this to the header:

Then I have created a print.css file and placed it in the theme folder. However, this does not seem to be working with Themler. It did work with all of my Artisteer Themes.

I went to Home > Settings > ADDITIONAL HEAD HTML and added the code above. However, I am still not getting the proper layout when I attempt to print. The HTML is showing up in the head as I checked the source code for the published pages. Is there another way I should go about achieving print styling?

EDIT: I want it to look exactly like it does on the screen when printed. Usually I simply copy the style.css, rename it to print.css and re upload. Right now I get a black and white page with every link tag with the link address in parenthesis and that just isn't useful to me.

Thank you for your help!!

Is there a way to effect the print styles? I have always just added my own style sheet for printing by adding this to the header: Then I have created a print.css file and placed it in the theme folder. However, this does not seem to be working with Themler. It did work with all of my Artisteer Themes. I went to Home > Settings > ADDITIONAL HEAD HTML and added the code above. However, I am still not getting the proper layout when I attempt to print. The HTML is showing up in the head as I checked the source code for the published pages. Is there another way I should go about achieving print styling? EDIT: I want it to look exactly like it does on the screen when printed. Usually I simply copy the style.css, rename it to print.css and re upload. Right now I get a black and white page with every link tag with the link address in parenthesis and that just isn't useful to me. Thank you for your help!!

Last edited 27 May 2016 by cellis

Vote to pay developers attention to this features or issue.
13 Comments
Order By: Standard | Newest
Stagger Lee
1838 Posts
Stagger Lee posted this 27 May 2016

You see, it is very clever idea. Will just check if WordPress has some template override for stylesheet (besides CSS file).

You need to call print CSS right way in header, Settings - Additional HTML.

You see, it is very clever idea. Will just check if WordPress has some template override for stylesheet (besides CSS file). You need to call print CSS right way in header, Settings - Additional HTML.
cellis
9 Posts
cellis posted this 27 May 2016

Forgot the code tags... here is the code I put into the head...

<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory');=""?>/print.css" />

Forgot the code tags... here is the code I put into the head... <link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory');=""?>/print.css" />

Last edited 27 May 2016 by cellis

Stagger Lee
1838 Posts
Is Solution
Stagger Lee posted this 27 May 2016

<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" />

<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" />
cellis
9 Posts
cellis posted this 27 May 2016

Yes, you are right. I have no idea why the ="" is in there. It is not on the actual site, just in the post. Sorry for the mistake.

Yes, you are right. I have no idea why the ="" is in there. It is not on the actual site, just in the post. Sorry for the mistake.
Stagger Lee
1838 Posts
Stagger Lee posted this 27 May 2016

Maybe it would be good idea to make custom Print button, and send (open) same page and same content to another custom Themler template. As preview before clicking finaly Print button inside this preview.

Could be done many nice things with it. Disable comments, images display:none, borders, custom header and footer (best for invoices), and some other. Will see how Google see it, if not as duplicate content. Right now have a blockade.

Maybe it would be good idea to make custom Print button, and send (open) same page and same content to another custom Themler template. As preview before clicking finaly Print button inside this preview. Could be done many nice things with it. Disable comments, images display:none, borders, custom header and footer (best for invoices), and some other. Will see how Google see it, if not as duplicate content. Right now have a blockade.
Stagger Lee
1838 Posts
Stagger Lee posted this 27 May 2016

Cellis, you dont say does it work for you now ?

Cellis, you dont say does it work for you now ?
cellis
9 Posts
cellis posted this 27 May 2016

No it does not work. :-( It worked with all of my Artisteer Themes but not Themler.

No it does not work. :-( It worked with all of my Artisteer Themes but not Themler.
Stagger Lee
1838 Posts
Stagger Lee posted this 27 May 2016

It works for me, just tested. Chrome browser.

Where do you add code ?

It works for me, just tested. Chrome browser. Where do you add code ?
Stagger Lee
1838 Posts
Stagger Lee posted this 27 May 2016

It wont help just copy / paste all code from style.css. You need to wrap all CSS code with:

@media print {
....copy your CSS code from style.css here...
}

Why do you force visitors to vaste colours on printer. Use black-white minimalistic print setting.

It wont help just copy / paste all code from style.css. You need to wrap all CSS code with: @media print { ....copy your CSS code from style.css here... } Why do you force visitors to vaste colours on printer. Use black-white minimalistic print setting.

Last edited 27 May 2016 by Stagger Lee

cellis
9 Posts
cellis posted this 27 May 2016

I added the code within Themler but that put it at the bottom of the head. Let me see if adding the @media print works...

I added the code within Themler but that put it at the bottom of the head. Let me see if adding the @media print works...
cellis
9 Posts
cellis posted this 27 May 2016

I wouldn't mind so much if it was black and white... it doesn't have to be colors. But what I do mind is that every single link has the link text then the link address in parenthesis after. Even the logo at the top and every navigation button.

I wouldn't mind so much if it was black and white... it doesn't have to be colors. But what I do mind is that every single link has the link text then the link address in parenthesis after. Even the logo at the top and every navigation button.

Last edited 27 May 2016 by cellis

srathje
29 Posts
srathje posted this 24 January 2017

Any ever get this solved? I can't get my print.css to work at all...the whole website layout is utterly broken and completely ignores my print.css file despite the instructions above and trying some other wordpress tutorials on print.css

Any ever get this solved? I can't get my print.css to work at all...the whole website layout is utterly broken and completely ignores my print.css file despite the instructions above and trying some other wordpress tutorials on print.css
Support Team
Support Team posted this 26 January 2017

Hello Stewart,
please submit new private topic and describe your issue in more details.
Also please provide access to your WP admin back end and we'll check the issue

Regards,
Aileen

Hello Stewart, please submit new private topic and describe your issue in more details. Also please provide access to your WP admin back end and we'll check the issue Regards, Aileen
You must log in or register to leave comments