Hallo zusammen,
ich suche einen Weg in meinem Child-Theme den CSS-Aufruf im Header von media=”screen” zu media=”screen, print” anzupassen.
Das ist notwendig, damit die “@media print” Anweisungen in meiner styles.css interpretiert werden.
Gibt es da ein Snippet was ihr mir zur Verfügung stellen könnt?
Viele Grüße!
Hey eperi!
Please add this on the child theme’s functions.php:
if(!is_admin()){
add_action('wp_enqueue_scripts', 'avia_register_frontend_scripts');
}
function avia_register_frontend_scripts()
{
$template_url = get_template_directory_uri();
$child_theme_url = get_stylesheet_directory_uri();
//register styles
wp_register_style( 'avia-style' , $child_theme_url."/style.css", array(), '1', 'screen print' ); //register default style.css file.
//register styles
wp_enqueue_style( 'avia-style');
}
Best regards,
Ismael
Dear Ismael,
thank you for your hint, I will test it as soon as possible, right now some other tasks seem more important.
I think, with Enfold 2.6.1 the print looks better than before.
And lastly: sorry for my late reply.
Cheers!
Hey!
Please try and let us know so we can mark this thread as resolved or assist you further
Cheers!
Yigit
Right now i am pleased with the print-styles. Issue solved!