Skip to content

Instantly share code, notes, and snippets.

@davekuhar
Last active December 21, 2015 22:59
Show Gist options
  • Save davekuhar/6379432 to your computer and use it in GitHub Desktop.
Save davekuhar/6379432 to your computer and use it in GitHub Desktop.
Function to add top nav section
<?php
// In functions.php:
add_action('genesis_before_header', 'child_include_topnav');
function child_include_topnav() {
require(CHILD_DIR.'/lib/topnav.php');
}
// In /lib/topnav.php
<div id="topnav">
<div class="topnav-left">
<p><?php echo date(get_option('date_format')); ?></p>
</div><!-- end .topnav-left -->
<div class="topnav-right">
<p>
<a class="rss-topnav" rel="nofollow" href="<?php bloginfo('rss_url'); ?>"><?php _e("Posts", 'genesis'); ?></a>
<a class="rss-topnav" rel="nofollow" href="<?php bloginfo('comments_rss2_url'); ?>"><?php _e("Comments", 'genesis'); ?></a>
</p>
</div><!-- end .topnav-right -->
</div><!-- end #topnav -->
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment