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 is the jack-of-all-trades running Transmit Studio, a media creation lab in San Jose. He's built more websites than he can remember, well over a hundred of them on WordPress. Whether it's tradeshow booths, video/TV, graphic design, presentations, magazine, tearsheet, and catalog layout, corporate identity packages, or just about any other kind of visual communication project, he's worked on it!

2 Comments

  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