• Does anyone know if it is possible to put just one menu item on the right-hand end of the menu bar, while all the other menu items remain on the left?

    This little block of code placed in custom_functions.php (Thesis) or functions.php of WordPress, will put a Login or Logout item (whichever is appropriate) on the menu bar.

    /* Add Login/Logout to Menu Bar */
    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
            ob_start();
            wp_loginout('index.php');
            $loginoutlink = ob_get_contents();
            ob_end_clean();
            $items .= '<li>'. $loginoutlink .'</li>';
        return $items;
    }

    But I would like it to appear away from the other menu items, off to the right by itself.

    Using WordPress & Thesis, latest version of each.

  • The topic ‘Just one menu item to the right of the menu bar’ is closed to new replies.