Hello there @e555,
If your script is inline you can use this filter to exclude it
add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' );
function js_combine_exclude_inline_script( $exclude_list ) {
$exclude_list[] = 'first few symbols of inline content script';
return $exclude_list;
}
You can also use this one by adding your script handle:
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
function js_combine_exclude( $exclude_list ) {
$exclude_list[] = 'script-handle';
return $exclude_list;
}
Depending on the case you can choose the one that suits best for you. Those code snippets can be added to your functions.php file. Keep in mind that it is better to put them in your child-themes functions.php. If you have any issues after that feel free to contact us.
Kind regards,
Stoyan
-
This reply was modified 4 years, 4 months ago by
Stoyan Georgiev. Reason: Did not ping the participant when first added the comment