Support » Fixing WordPress » Login/Logout in Menu

Viewing 3 replies - 1 through 3 (of 3 total)
  • ok I was able to get it to just display on my second menu by doing this

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
    		$loginoutlink = ob_get_contents();
    		if( $args->theme_location == 'secondary-menu' ){
    			$items .= '<li>'. $loginoutlink .'</li>';
    		return $items;

    Now how do I position it in the menu?

    I’d also like to know how. Tried changing the priority number 10 to something else, but it didn’t work.

    No extra coding is needed. Here is easy to use plugin – BAW Login/Logout menu:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Login/Logout in Menu’ is closed to new replies.