Create a gist now

Instantly share code, notes, and snippets.

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