// Adds the text element to the powerpack header components
function sp_header_components_custom_text( $components ) {
$components['text'] = array(
'title' => __( 'Custom Text', 'storefront-powerpack' ),
'hook' => 'sp_header_custom_text_output'
);
return $components;
}
add_filter( 'sp_header_components', 'sp_header_components_custom_text' );
// Adds text area output to the Storefront header
function sp_header_custom_text_output() {
echo '<div class="custom-text">';
echo 'Some custom text added to header in Storefront Powerpack';
echo '</div>';
}
add_action( 'storefront_header', 'sp_header_custom_text_output' );