How to Create a Log Out Link in Your Menu
If you would like to create a logout link in your main menu, there is an effortless way to do this using the WooCommerce plugin.
- In your WordPress backend navigate to Appearance → Menus → Add menu items → WooCommerce endpoints and select the Logout option.
- Once you added the endpoint to your menu, navigate to Appearance → Menus → and select Main Menu (Primary Menu)
*Ensure you have enabled Display Mode: Logged In Users so that the logout menu link only shows for logged-in users.

Updated on July 19, 2021