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

    I like that enfold attempts to merge scripts and styles to help with performance, but I have a usage case where I don’t want the child theme’s scripts and styles to be included in the merges.

    What’s the best way to go about the following?:

    1. 1. merging the parent theme’s scripts and styles but NOT including the child theme’s scripts and styles
    2. 2. loading the child theme’s scripts and styles after the parent theme has been loaded

    I am not sharing my credentials with you to login to my site, so please don’t ask me for that.


    • This topic was modified 4 years, 7 months ago by Michael.




    Thank you for using Enfold.

    You can try to use filter avf_exclude_assets and add the scripts/styles you do not want to be merged.

    I would suggest to load the child theme scripts and styles after parent theme.

    Hope this helps you.

    Best regards,


    Where is the full documentation for this and examples? I want to implement this correctly without a lot of trial and error.



    There is no documentation for this filter.

    But as you can see here:

    enfold\config-templatebuilder\avia-template-builder\php\asset-manager.class.php line 28:

    //files to exclude
    var $exclude_files	= array('css' => array('admin-bar','dashicons'), 'js' => array('jquery-core','admin-bar','comment-reply'));

    and line 61:

    // files that are always excluded like admin bar files
    // files that are processed are added to this list as well, in case another file should be generated
    $this->exclude_files  = apply_filters( 'avf_exclude_assets'  , $this->exclude_files  );

    And an example how to use the filter:

    Best regards,

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