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.
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
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.
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