Adding static content to the Storefront header requires hooking a function that outputs your content into storefront_header
.
You can control the position of the markup via the priority set. For example, the following snippet would add a ‘row’ between the site title / secondary navigation / search and the primary navigation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'storefront_header', 'jk_storefront_header_content', 40 ); | |
function jk_storefront_header_content() { ?> | |
<div style="clear: both; text-align: right;"> | |
Have questions about our products? <em>Give us a call:</em> <strong>0800 123 456</strong> | |
</div> | |
<?php | |
} |
Tweak the priority and the inline CSS to meet your requirements.
We recommend adding snippets like this to your Theme Customization plugin to ensure that your custom code isn’t lost when you update Storefront or any Storefront Child Theme.