Created
November 11, 2013 16:19
-
-
Save ejntaylor/7415876 to your computer and use it in GitHub Desktop.
Adds a unique menu for blog related pages
This file contains hidden or 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
| <?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