Created
April 29, 2013 14:18
-
-
Save jamiemitchell/5481837 to your computer and use it in GitHub Desktop.
Add Login/out to primary nav
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
<?php | |
/* Add Login/out to primary nav | |
------------------------------------------------------------ */ | |
add_filter('wp_nav_menu_items','my_item', 11, 2); | |
function my_item($items, $args) { | |
if( is_admin() || $args->theme_location != 'primary' ) | |
return $items; | |
$items .= '<li class="right">' . do_shortcode('[footer_loginout redirect="http://yoursite/members/"]') . '</li>'; | |
return $items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment