Print Button -> print.css
-
Hi there,
for each page I want to add a print button. This button makes the site reload with other style sheets, so that is fine for printing.
I am using post name permalink setting, so a link to a page or post looks like http://my-url.de/sample-post/:
<a href="<?php print get_permalink().'?print=true'; ?>" title="Printversion">...</a>
As a fist solution I added just a ?print=true to the link and then check for $_GET[‘print’]:
<?php if( !isset($_GET['print']) || $_GET['print']!=true || !(is_single()||is_page()) ): ?>...
This works fine so far, but it is not a clean solution. When changing the permalink structure this might not work, since it will end in somethink like http://my-url.de/?p=123?print=true
So what might a nice solution for that issue?
Thanks
Blueshark
- The topic ‘Print Button -> print.css’ is closed to new replies.