Add login/logout to WP’s built-in menus


Here’s an easy way to add WordPress’s built-in login/logout link to the your menus. I have it coded to work with Genesis’s menus, but you can make this work with any theme by changing the theme_location argument.

stuff we dig

FYI: yes, the above are affiliate links, so we do make a small amount of money if you follow them over and buy what they're selling. Thank you for helping pay our hosting costs!

Dave Kuhar

Dave ran Transmit Studio, a media creation lab in San José. He's built more websites with WordPress than he can remember. He's reluctantly moved back to Ohio and now works for Stanford University (remotely). He likes hearing himself talk and writing about himself in third person.


  1. Marc on May 30, 2015 at 3:14 am

    This works fine with my primary menu but for some reason it doesn’t work with the secondary menu. I cam even get it working with a third custom menu I set up. Any ideas why the secondary wouldnt work??

    • Dave Kuhar on June 8, 2015 at 7:08 pm

      So your secondary menu is registered and showing up, but the link doesn’t show up there? Also, verify that the secondary menu is actually registered with the name “secondary” – if not, change the name in the line $args->theme_location == ‘secondary’ to fit whatever it’s called.

Leave a Comment