Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #920486

    Hi, how can u I add style.css file from child theme to merge files, bcs priority of merged files override my child styles, and i dont want to add important or #top id for override it.
    THat happens after last updates, when merge styles was release.
    At this time I disable it by
    add_filter('avf_merge_assets', '__return_false');
    but better will be include my style.

    • This topic was modified 6 years, 9 months ago by mdxclr.
    #921464

    Hey mdxclr,

    Thank you for using Enfold and reporting this.

    I will forward it to Kriesi.

    The correct filter to skip compression should return ‘none’ (Enfold 4.2.5, see enfold\config-templatebuilder\avia-template-builder\php\asset-manager.class.php line 29:

    
    add_filter('avf_merge_assets', function() {
    	return 'none';
    });
    

    Best regards,
    Günter

    #922514

    how to disable compression I know, but I want to add Child style.css to that compressor, bcs he has lower priority then compressed and overrided.

    #923031

    Hey!

    Please add following code to Functions.php file in Appearance > Editor

    add_action( 'wp_enqueue_scripts', 'av_dequeue_child_stylecss', 20 );
    function av_dequeue_child_stylecss() {
        if(is_child_theme()){
            wp_dequeue_style( 'avia-style' );
        }
    }
    
    add_action( 'wp_enqueue_scripts', 'av_reenqueue_child_stylecss', 9999999 );
    function av_reenqueue_child_stylecss() 
    {
        if (is_child_theme()){
            wp_enqueue_style( 'avia-style', get_stylesheet_uri(), true, filemtime( get_stylesheet_directory() . '/style.css' ), 'all');
        }
    }

    Cheers!
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.