Created
May 6, 2016 17:36
-
-
Save mikeoberdick/85f26320d30a186f957e672ca96235a9 to your computer and use it in GitHub Desktop.
The PHP and CSS for the Genesis utility header
This file contains 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
/* ## Utility Header | |
--------------------------------------------- */ | |
.utility_header { | |
background-color: #00457c; | |
width: 100%; | |
} | |
.utility_header_wrap { | |
max-width: 1200px; | |
padding-left: 5%; | |
padding-right: 5%; | |
margin: 0 auto; | |
padding: 5px 0; | |
text-align: right; | |
} | |
.social_icons li { | |
display: inline-block; | |
padding-left: 5px; | |
} | |
.social_icons li a { | |
color: #ffffff; | |
} | |
.utility_header .social_icons li a:hover { | |
color: #f68026; | |
} | |
@media only screen and (max-width: 1200px) { | |
.utility_header_wrap { | |
max-width: 960px; | |
padding-left: 5%; | |
padding-right: 5%; | |
} | |
} | |
@media only screen and (max-width: 960px) { | |
.utility_header_wrap { | |
max-width: 800px; | |
} | |
} | |
@media only screen and (max-width: 320px) { | |
.utility_header { | |
text-align: center; | |
} | |
} |
This file contains 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 a utility header above main header | |
add_action ('genesis_before_header', 'd4tw_utility_header'); | |
function d4tw_utility_header () { | |
echo ' | |
<div class = "utility_header"> | |
<div class = "utility_header_wrap"> | |
<ul class = "social_icons"> | |
<li><a href="#" target = "_blank"><em class="fa fa-envelope"></em></a></li> | |
<li><a href="#" target = "_blank"><em class="fa fa-facebook"></em></a></li> | |
<li><a href="#" target = "_blank"><em class="fa fa-twitter"></em></a></li> | |
<li><a href="#" target = "_blank"><em class="fa fa-instagram"></em></a></li> | |
</ul> | |
</div> | |
</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment