Snippet: Conditionally Enable/Disable The “Topbar”
add_action( 'totaltheme/topbar/is_enabled', function( $bool ) {
// Disable on checkout
if ( function_exists( 'is_checkout' ) && is_checkout() ) {
$bool = false;
}
// Return display
return $bool;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)