skip to Main Content

Conditionally Enable/Disable The “Topbar”

add_action( 'wpex_is_top_bar_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 the Code Snippets Plugin (or alternative plugin)
Back To Top