Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RiFi2k/5f4a0f4874b7330ad6f25508473f4479 to your computer and use it in GitHub Desktop.
Save RiFi2k/5f4a0f4874b7330ad6f25508473f4479 to your computer and use it in GitHub Desktop.
add_filter( 'script_loader_tag', 'remove_site_scripts', 999, 3 );
function remove_site_scripts( $tag, $handle, $src ) {
global $pagename;
if ( 'login' === $pagename ) {
$tag = '';
}
return $tag;
}
add_filter( 'style_loader_tag', 'remove_site_styles', 999, 4 );
function remove_site_styles( $html, $handle, $href, $media ){
global $pagename;
if ( 'login' === $pagename ) {
if ( strpos($handle,'um') !== false || strpos($handle,'job') !== false ) {
$html = '';
}
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment