Skip to content

Instantly share code, notes, and snippets.

@srikat
Created February 11, 2014 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save srikat/8931730 to your computer and use it in GitHub Desktop.
Save srikat/8931730 to your computer and use it in GitHub Desktop.
http://i.imgur.com/2tdL6Wm.png. To add code after "ul" in "nav-header" when using Gary's Genesis Header Nav plugin, https://github.com/GaryJones/genesis-header-nav. Background: https://twitter.com/chillybindesign/status/433087869771460608
In class-genesis-header-nav.php
above
$nav_output = $nav_markup_open . $nav . $nav_markup_close;
add
$nav = $nav . '<div class="menu-header-right"><i class="fa fa-phone"></i></div>';
Replace "<i class="fa fa-phone"></i>" with whatever you want to add.
Code in functions.php:
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );
}
Code in style.css:
.nav-header {
float: right;
}
.menu-header {
float: left;
width: auto;
}
.menu-header-right {
float: right;
padding: 2.7rem 2.4rem;
}
@chillybin
Copy link

Thanks, I got it working by changing the order around a little because of the 2 float rights and tweaked some of the CSS to get it right

$nav = '<div class="menu-header-right"><a href="/contact-us" title="Contact Us"><i class="fa fa-phone-square fa-3x"></i></a></div>' . $nav;

http://cl.ly/image/3S383k3p3M07

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