Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eri-trabiccolo/b187ade909131b9c2c18 to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/b187ade909131b9c2c18 to your computer and use it in GitHub Desktop.
replace socials with site title in header
add_action('wp_head', 'replace_socials_with_title');
function replace_socials_with_title(){
if ( ! ( class_exists('TC_header_main') &&
method_exists('TC_header_main', 'tc_title_view') &&
method_exists('TC_header_main', 'tc_social_in_header') ) )
return;
remove_action('__navbar', array(TC_header_main::$instance, 'tc_social_in_header'), 10 );
add_action('__navbar', 'site_title', 10);
function site_title(){
add_filter('tc_logo_class','__add_logo_classes', 30);
TC_header_main::$instance -> tc_title_view(array());
}
function __add_logo_classes($classes){
return array('brand', 'span5', 'pull-left');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment