Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #231287

    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!

    #231734

    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

    #247534

    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!

    #247542

    Hey!

    Please try and let us know so we can mark this thread as resolved or assist you further

    Cheers!
    Yigit

    #260369

    Right now i am pleased with the print-styles. Issue solved!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Wie kann ich media="screen, print" dem CSS-Aufruf hinzufügen?’ is closed to new replies.