Skip to content

Instantly share code, notes, and snippets.

@agusmu
Last active December 20, 2015 04:09
Show Gist options
  • Save agusmu/6068851 to your computer and use it in GitHub Desktop.
Save agusmu/6068851 to your computer and use it in GitHub Desktop.
PrimaShop - Responsive Logo
/* add responsive logo to header left area */
add_action( 'prima_header_left', 'prima_custom_responsive_logo', 5 );
function prima_custom_responsive_logo() {
$logo = prima_get_setting( 'header_logo' );
if ( $logo ) {
echo '<a href="'.home_url().'" class="header-logo"><img src="'.$logo.'" alt=""/></a>';
}
}
/* remove default header logo class */
add_filter( 'body_class', 'prima_custom_header_logo_class', 20 );
function prima_custom_header_logo_class( $classes ) {
$classes = array_diff( $classes, array('header-logo-active') );
return $classes;
}
/* Hide default site title to replace it with responsive logo */
#header-title .site-title {
height: 0px !important;
overflow: hidden;
text-align: left;
text-indent: -99999px;
}
/* top and bottom padding of the responsive logo */
#header-title a.header-logo {
padding-top: 35px;
padding-bottom: 35px;
}
@agusmu
Copy link
Author

agusmu commented Sep 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment