Snippets: Hide Top Bar Social on Small Devices

// Alter the topbar social classes
add_filter( 'wpex_topbar_social_class', function( $class ) {

	// Get breakpoint at which the top bar becomes centered as defined in the Customizer
	$breakpoint = wpex_topbar_split_breakpoint();

	// Add custom classes to hide top bar social on small devices
	$class[] = 'wpex-hidden wpex-' . sanitize_html_class( $breakpoint ) . '-block';

	// Return class
	return $class;
} );

Snippet Type: PHP

Posted Under: Top Bar

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)