Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #356265

    Hi, i want delete the link of print.css from header. How can i do that ?
    Thanks

    #356757

    Hey avanzamas!

    Please go to Appearance > Editor and open Functions.php file and find

    wp_enqueue_style( 'avia-print' ,  $template_url."/css/print.css", array(), '1', 'print' );

    and comment it out as following

    //wp_enqueue_style( 'avia-print' ,  $template_url."/css/print.css", array(), '1', 'print' );

    Regards,
    Yigit

    #742036

    Hi Yigit,

    An old post but relevant: can this be managed by using the child theme’s functions.php?

    Regards,
    Daniel

    #742044

    Hey!

    Add the following to your functions.php

    wp_dequeue_style( ‘avia-print’ );

    and let us know if it works out for you.

    Best regards,
    Basilis

    #742300

    Hi Basilis,

    When I add that to the bottom of my child theme’s functions.php I get this error:

    Notice: Use of undefined constant ‘avia – assumed ‘‘avia’ in /path/to/wordpress/wp-content/themes/enfold-child/functions.php on line 57

    Notice: Use of undefined constant print’ – assumed ‘print’’ in /path/to/wordpress/wp-content/themes/enfold-child/functions.php on line 57

    Notice: wp_dequeue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /path/to/wordpress/wp-includes/functions.php on line 4136

    edit: I also tried the solution posted here but without any luck: https://kriesi.at/support/topic/remove-native-css-framework/

    • This reply was modified 7 years, 10 months ago by Daniel.
    #742342

    if you like to enque your own file :

    add_action( 'wp_enqueue_scripts', 'wp_change_printcss', 20 );
    function wp_change_printcss() {
       wp_dequeue_style( 'avia-print' );
        wp_enqueue_style( 'avia-print-child', get_stylesheet_directory_uri().'/css/print.css' );
    }

    put in you own rules to print.css and upload it to your Child-Theme/css folder

    #742378

    Hi,

    @Gunni007 thank you for the suggestion.

    Let us know if you have any questions. We are happy to help.

    Best regards,
    Vinay

    #742410

    Thanks @Gunni007!

    add_action( 'wp_enqueue_scripts', 'wp_change_printcss', 20 ); 
    function wp_change_printcss() { 
    wp_dequeue_style( 'avia-print' ); 
    } 

    did the trick.

    #742412

    Hi,

    Glad we could help!
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Delete Print.css file’ is closed to new replies.