Tagged: ,

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

    Hi,

    if I want to use a different css framerwork for child theme.
    So I looking for a way to remove native css framework.

    function remove_css(){
    wp_dequeue_style( ‘avia-base-css’ );
    wp_deregister_style( ‘avia-base-css’ );
    }
    add_action(‘wp_head’, ‘remove_css’, 99999);

    I put this code in function.php of child theme, but this code doesn’t…

    Can you help me, please?

    #377138

    Hey WEBCREATIVI!

    Try this instead.

    add_action( 'wp_enqueue_scripts', 'enfold_remove_css', 20 );
    function enfold_remove_css() {
    	wp_dequeue_style( 'avia-base' );
        wp_deregister_style( 'avia-base' );
    }

    Cheers!
    Elliott

    #377309

    Thank you.
    Sorry I tried with the “wp_enqueue_scripts” hook, but it doesn’t’

    add_action( ‘wp_enqueue_scripts’, ‘enfold_remove_css’, 20 );
    function enfold_remove_css() {
    wp_dequeue_style( ‘avia-layout-css’ );
    wp_deregister_style( ‘avia-layout-css’ );

    wp_dequeue_style( ‘avia-print-css’ );
    wp_deregister_style( ‘avia-print-css’ );

    wp_dequeue_style( ‘avia-scs-css’ );
    wp_deregister_style( ‘avia-scs-css’ );
    }

    I cannot remove these CSS of parent theme…

    have you suggest something, please…

    #377405

    I resolved it.
    No “-css” the end of ID.
    add_action( ‘wp_enqueue_scripts’, ‘enfold_remove_css’, 20 );
    function enfold_remove_css() {
    wp_dequeue_style( ‘avia-layout’ );
    wp_deregister_style( ‘avia-layout’ );

    wp_dequeue_style( ‘avia-print’ );
    wp_deregister_style( ‘avia-print’ );

    wp_dequeue_style( ‘avia-scs’ );
    wp_deregister_style( ‘avia-scs’ );
    }

    #377412

    Hi!

    Glad you figured it out!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Remove native css framework’ is closed to new replies.