When I click the print link at the article page it just shows up a blank page to be printed. any ideas on this?
Oh, I’m talking about the DW Focus theme.
Yes, and the email button doesn’t work either.
Hi !
-can you send links site of you all. I can check and fix for you.
Regards,
Dominic
I think you have my info already…thanks!
the print option when using my iPhone 5 opens a new page that is blank rather than opening a new email. the print button in Firefox also opens outlook and has the title of the article as the email subject. However it does not have a link or anything from the article in the subject area.
Hi !
Please go to line 430 of <dw-focus>/functions.php and replace below line:
<li><i></i><a href=”javascript:window.print()” ><?php _e(‘Print this article’,’dw_focus’); ?></a></li>
by
<li><i></i><a href=”#” onclick=”window.print();”><?php _e(‘Print this article’,’dw_focus’); ?></a></li>
If you want to print only content of this post please follow my guide bellow:
1, Create print.css file in <dw-focus>/assets/css/print.css with content:
body{
visibility: hidden;
}
body .content-print {
visibility: visible;
}
body .content-print .entry-action{
visibility: hidden;
}
2, Go to <dw-focus>/functions.php add this code
/**
* PRINT SETUP
*/
function dw_print_enqueue_style(){
if( is_single() ){
wp_enqueue_style( ‘print-style’, get_template_directory_uri() . ‘/assets/css/print.css’, array(), false, $media = ‘print’ );
}
}
add_action( ‘wp_enqueue_scripts’, ‘dw_print_enqueue_style’ );
function dw_add_class_for_print($classes) {
global $post;
$classes[] = ‘content-print’;
return $classes;
}
add_filter(‘post_class’, ‘dw_add_class_for_print’);
Regards,
Dominic
Very nice, Dominic. It worked first try. Thank you! Maybe I will even try fixing the email link too now that I know where it is!
Let me know what you do if you fix it Ellery!
Oh, you bet!
Please login or Register to submit your answer