Skip to content

Instantly share code, notes, and snippets.

@ejntaylor
Created November 11, 2013 16:19
Show Gist options
  • Select an option

  • Save ejntaylor/7415876 to your computer and use it in GitHub Desktop.

Select an option

Save ejntaylor/7415876 to your computer and use it in GitHub Desktop.
Adds a unique menu for blog related pages
<?php
// Add main nav to the woo_header_inside hook unless blog page
function is_blog() {
if (is_home() || is_singular('post') || is_post_type_archive('post') || is_archive())
return true;
else return false;
}
add_action( 'woo_header_inside','custom_nav', 10 );
function custom_nav() {
if(is_blog()) {
get_template_part('includes/postnav');
} else {
woo_nav();
}
};
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment