Skip to content

Instantly share code, notes, and snippets.

@fovoc
Created September 9, 2015 15:33
Show Gist options
  • Select an option

  • Save fovoc/298733592eae1f86e95c to your computer and use it in GitHub Desktop.

Select an option

Save fovoc/298733592eae1f86e95c to your computer and use it in GitHub Desktop.
Shoestrap 3 - change Header Branding template
<?php
/*
* The Header template
*/
function header_branding() {
global $ss_settings;
if ( $ss_settings['header_toggle'] == 1 ) {
echo '<div class="before-main-wrapper">';
if ( $ss_settings['site_style'] == 'boxed' ) {
echo '<div class="container header-boxed">';
}
echo '<div class="header-wrapper">';
if ( $ss_settings['site_style'] == 'wide' ) {
echo '<div class="container">';
}
if ( $ss_settings['header_branding'] == 1 ) {
echo '<a class="clearfix brand-logo" href="' . home_url() . '/">' . Shoestrap_Branding::logo() . '</a>';
}
if ( $ss_settings['header_branding'] == 1 ) {
$pullclass = ' class="pull-right"';
} else {
$pullclass = null;
}
echo '<div' . $pullclass . '>';
dynamic_sidebar( 'header-area' );
echo '</div>';
if ( $ss_settings['site_style'] == 'wide' ) {
echo '</div>';
}
echo '</div>';
if ( $ss_settings['site_style'] == 'boxed' ) {
echo '</div>';
}
echo '</div>';
}
}
function change_header_branding() {
global $ss_headers;
remove_action( 'shoestrap_pre_wrap', array( $ss_headers, 'branding' ), 3 );
add_action( 'shoestrap_pre_wrap', 'header_branding', 3 );
}
add_action('wp', 'change_header_branding');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment