If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #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) {



    $loginoutlink = ob_get_contents();


    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,



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



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

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