Storefront is a nice and clean WooCommerce theme.

The theme has lots of hooks that you can find on Storefront Hooks page.

You can use this snippet to include any text at the top of the site. The code below captures the content and outputs it.

This should work for Storefront child themes well. Hopefully, whoever customized the theme(s) kept the hooks.

add_action('storefront_content_top', 'orb_blog6506_storefront_content');

* Author Svetoslav Marinov
* <a href='' target='_blank'></a>
function orb_blog6506_storefront_content() {	
<div style='background:#037fbc; color:#fff; border:3px dashed;padding:5px; margin:10px 0;'> 
	We are running a promo. 
	<a style='color:#fff; font-weight:bolder;' 
	href='/contact/' target='_blank'>Contact us</a> for more info.
	$buff = ob_get_clean();
	$buff = trim($buff);

	echo $buff;

Why / Benefits

The benefits of this global message are.

  • Users are informed about promotions and deals.
  • If you need to tell them something important and want to make sure they 100% read it.
  • You can put a message to contact you if there's a product recall
  • What other use cases do you see?

Image Credit: Artem Gavrysh (@tmwd), image id: F6-U5fGAOik on Unsplash