Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28457

    I still need an answer on how to put a call to action button (login)logout at the end of the nav bar AFTER the search bar. It needs to be apart from the nav bar. I found this: 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();

    if( $args->theme_location == ‘sub-menu’ ) {

    $items .= ‘

    ‘. $loginoutlink .’

    ‘;

    }

    return $items;

    }

    but I need to know what the menu is. I am using the small fixed header, I have tried everything I could see in replacement of sub-menu, so . is this code right? and 2. if it’s not right I need the proper code for this,

    #137592

    Hi,

    You can use this plugin: http://wordpress.org/plugins/baw-login-logout-menu/

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Adding buttons to nav bar after search bar’ is closed to new replies.