WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking to move the login / logout / my account / register details currently situated under my menu bar to above the menu bar.

Essentially I want to add the details just after the header.

What do I need to add to my functions.php file in my child theme for this to work?

share|improve this question
Can you please post the relevant code? What code is outputting the login/logout/register/my account details, and what code is outputting your menu bar? – Chip Bennett Feb 4 '13 at 14:46

Here is a function i use to display the log in/out and registration URLs

//Add login/logout link to naviagation menu
function add_login_out_item_to_menu_wpa84418( $items, $args ){

    //change theme location with your them location name
    if( is_admin() ||  $args->theme_location != 'LOCATION' )
        return $items; 

    $redirect = ( is_home() ) ? false : get_permalink();

    if( is_user_logged_in( ) )
        $link = '<a href="' . wp_logout_url( $redirect ) . '" title="' .  __( 'Logout' ) .'">' . __( 'Logout' ) . '</a>';
    else {
        $link = '<a href="' . wp_login_url( $redirect  ) . '" title="' .  __( 'Login' ) .'">' . __( 'Login' ) . '</a>';
        if (get_option('users_can_register'))
            $link = wp_register('<li>', '</li>', false) . $link;

    return $items.= '<li id="log-in-out-link" class="menu-item menu-type-link">'. $link . '</li>';

add_filter( 'wp_nav_menu_items', 'add_login_out_item_to_menu_wpa84418', 50, 2 );

Just make sure you change theme LOCATION with your them location name

share|improve this answer
THIS WORKED LIKE A CHARM>>>> THANK YOU. – Kev Hopwood Jun 10 '13 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.