Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created April 19, 2015 12:09
Show Gist options
  • Select an option

  • Save eri-trabiccolo/b7bf2b5e59e8ba1cf849 to your computer and use it in GitHub Desktop.

Select an option

Save eri-trabiccolo/b7bf2b5e59e8ba1cf849 to your computer and use it in GitHub Desktop.
Swap logo and navbar
add_action('wp_head', 'swap_logo_navbar');
function swap_logo_navbar(){
if ( ! ( method_exists('TC_header_main', 'tc_prepare_logo_title_display') &&
method_exists('TC_header_main', 'tc_navbar_display') ) )
return;
remove_action('__header', array(TC_header_main::$instance, 'tc_prepare_logo_title_display'), 10 );
remove_action('__header', array(TC_header_main::$instance, 'tc_navbar_display'), 30 );
add_action('__header', array(TC_header_main::$instance, 'tc_prepare_logo_title_display'), 30 );
add_action('__header', array(TC_header_main::$instance, 'tc_navbar_display'), 10 );
}
/* Put this in your custom css (without the comments) */
/*
.sticky-enabled .nav-collapse{
float: left;
}
.tc-no-sticky-header .logo-centered .navbar-wrapper, .sticky-disabled .logo-centered .navbar-wrapper {
margin: auto;
}
.tc-no-sticky-header .logo-centered .brand, .sticky-disabled .logo-centered .brand {
margin-left: 0
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment