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 kellenmace/b409f3805c1c8104a6c1195c51511641 to your computer and use it in GitHub Desktop.
Save kellenmace/b409f3805c1c8104a6c1195c51511641 to your computer and use it in GitHub Desktop.
Disable CMB2 styles on front end forms
<?php
/**
* Disable CMB2 styles on front end forms.
*
* @return bool $enabled Whether to enable (enqueue) styles.
*/
function km_disable_cmb2_front_end_styles( $enabled ) {
if ( ! is_admin() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'cmb2_enqueue_css', 'km_disable_cmb2_front_end_styles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment