Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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