This will add a Login or Logout (depending on state) to your WordPress navigation menu. I have one on mine now; makes it easy to quickly log in/out to test things.
Put the following in your child theme’s custom functions PHP file.
add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); function add_loginout_link( $items, $args ) { if (is_user_logged_in()) { $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; } elseif (!is_user_logged_in()) { $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; } return $items; }
I found your blog (https://techish.net/ ) and interested in paid post. Let me know if you are interested then I will give you more details.
I can offer you best to make it worth your time.
Regards