Exclude JS Files From Async | Only WP-Admin and WP-Login Pages
-
Good Day,
We would like to apply the filter below only to our WP-Admin and WP-Login pages. Can you kindly provide a code snippet to acccomplish that?
For some reason, your plugin is also affecting those pages when it shouldn’t. We already confirmed the filter provided below fixes our jQuery issue on those pages, but is hurting all other website pages (i.e., jQuery is render-blocking).
Thank you!
———-
add_filter( 'sgo_js_async_exclude', 'js_async_exclude_acl' );
function js_async_exclude_acl( $exclude_list ) {
$exclude_list[] = 'jquery-core';
return $exclude_list;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Exclude JS Files From Async | Only WP-Admin and WP-Login Pages’ is closed to new replies.