Snippets: 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;

} );

Snippet Type: PHP

Posted Under: Top Bar

All PHP snippets should be added via a child theme's functions.php file.