Skip to content

Instantly share code, notes, and snippets.

@woogist
Last active December 19, 2020 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save woogist/4e1e1f59bbca9d997ae7 to your computer and use it in GitHub Desktop.
Save woogist/4e1e1f59bbca9d997ae7 to your computer and use it in GitHub Desktop.
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
Copy link

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

@leonvanv
Copy link

leonvanv 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