How to Add top bar to Storefront before the header

Storefront don’t have a top bar by default, By adding simple snippet to the theme’s functions.php you can add a Top bar to Storefront theme before the header.

 * Adds a top bar to Storefront, before the header.
function storefront_top_bar() {
$html = '
<div id="topbar">';
$html .= '
<div class="col-full">';
$html = 'You can add your content here...';
$html = '</div>
add_action( 'storefront_before_header', 'storefront_top_bar' );

Leave a Reply

Your email address will not be published. Required fields are marked *