Last active
December 20, 2015 04:09
-
-
Save agusmu/6068851 to your computer and use it in GitHub Desktop.
PrimaShop - Responsive Logo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tutorial: http://www.primathemes.com/documentation/primashop-responsive-logo/