• Resolved sshabir

    (@sshabir)


    How to exclude more than 4 js files using sbp_exclude_defer_scripts filter? as website slider not showing on front page after using Speed Booster Pack Plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @sshabir,

    Thank you for reaching out to us!
    At the moment there are only 4 fields available.
    However you can exclude more by adding the following code in your theme’s functions.php file:

    add_filter( 'sbp_exclude_defer_scripts', 'theme_name_exclude_script' );
    
    function theme_name_exclude_script( $excludes ) {
    	$excludes[] = 'script-hadle-1';
    	$excludes[] = 'script-hadle-2';
    	$excludes[] = 'script-hadle-3';
    
    	return $excludes;
    }

    You will need to replace script-hadle-1 with your script’s handle.
    And you can add as many as you’d like.

    Thank you,
    Mihaela

    • This reply was modified 7 years, 7 months ago by Miha.
    Thread Starter sshabir

    (@sshabir)

    Thank you it’s working.

    Happy to hear it’s working, @sshabir!

    If you’re happy with the plugin and the support received please leave us a review here: https://ww.wp.xz.cn/support/plugin/speed-booster-pack/reviews/

    We could use the help!

    Thank you so much,
    Mihaela

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to use sbp_exclude_defer_scripts filter’ is closed to new replies.