Skip to content

Instantly share code, notes, and snippets.

@jmabbas
Created May 10, 2017 04:17
Show Gist options
  • Save jmabbas/805162b607a1ebdbeb6f55d655083623 to your computer and use it in GitHub Desktop.
Save jmabbas/805162b607a1ebdbeb6f55d655083623 to your computer and use it in GitHub Desktop.
Pizzaro header V-1 with header V-2 cart Style
add_action('wp_loaded', 'pz_custom_wp_loaded');
function pz_custom_wp_loaded() {
remove_action( 'pizzaro_header_v1', 'pizzaro_header_cart_v2', 50 );
}
add_action( 'pizzaro_header_v1', 'pizzaro_header_cart', 50 );
.header-v1 .site-header-cart .cart-contents {
padding: .604em 0;
color: #fff;
line-height: 1;
font-size: 1.188em;
background-color: transparent;
}
@media (min-width: 768px) {
.site-header-cart .cart-contents {
display: block;
position: relative;
background-color: transparent;
height: auto;
width: auto;
text-indent: 0;
}
.header-v1 .site-header-cart .cart-contents .amount {
margin-right: .327em;
display: inline;
}
.header-v1 .site-header-cart .cart-contents .amount span {
display: inline;
}
.site-header-cart .widget_shopping_cart {
position: absolute;
top: 100%;
width: 300px;
z-index: 999999;
font-size: .875em;
right: -999em;
display: block;
background-color: #fdfdfd;
padding: 12px 0;
border-radius: 6px;
box-shadow: 0 0 6px 0 rgba(1,1,1,.3);
}
}
.header-v1 .site-header-cart .cart-contents:before {
content: "\47";
display: inline-block;
vertical-align: middle;
border: 1px solid #dcdcdc;
border-radius: 50px;
padding: .579em;
margin-right: 14px;
font-family: font-pizzaro;
}
.header-v1 .site-header-cart .cart-contents:after {
height: 1em;
float: right;
content: "\f291";
line-height: 1.618;
display: inline-block;
font-family: FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.header-v1 .site-header-cart .cart-contents .amount {
font-weight: 900;
vertical-align: middle;
opacity: 1;
font-size: .737em;
}
.header-v1 .site-header-cart .cart-contents .amount span {
font-weight: 400;
font-size: .929em;
padding-right: 6px;
}
.header-v1 .site-header-cart .cart-contents .count {
position: absolute;
padding: .5em 0;
background: #4caf50;
font-size: .579em;
text-align: center;
width: 22px;
border-radius: 50px;
font-weight: 900;
left: 0;
line-height: 1;
top: 2px;
opacity: 1;
vertical-align: middle;
display: block;
}
.site-header .widget {
margin-bottom: 0;
}
.header-v1 .site-header-cart .cart-contents:after {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment