How to show logout button

Make two menu, one with login link and the other with logout link

Add the following code to functions.php

function my_wp_nav_menu_args( $args = ” ) {
  if( is_user_logged_in() ) {
    $args[‘menu’] = ‘with-logout-button’;
  } else {
    $args[‘menu’] = ‘with-login-button’;
  }
  return $args;
}
add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );

Log In

How to Use Docker + Webtop to Secure Your Online Activities