Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a top bar to Storefront, before the header
<?php
/**
* Adds a top bar to Storefront, before the header.
*/
function storefront_add_topbar() {
?>
<div id="topbar">
<div class="col-full">
<p>Your text here</p>
</div>
</div>
<?php
}
add_action( 'storefront_before_header', 'storefront_add_topbar' );
@el-presidente

This comment has been minimized.

Copy link

commented Nov 17, 2015

I get a server error 500 when adding this - so please omit the <?php when documenting these gist/snippets..

@leonvanv

This comment has been minimized.

Copy link

commented Aug 7, 2016

Your text here

} add_action( 'storefront_before_header', 'storefront_add_topbar' ); there are a error on line 7 (for wordpress) Please help . How to fix this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.