In my site I made two different menus. One is for visitors and the other is for logged in members. Here are the codes I've used -
<php?
if( is_user_logged_in() ) {
$menu = 'Login Menu';}
else {
$menu = 'Main Menu'; }
wp_nav_menu( array( 'menu' => $menu, 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
Now on " Main Menu " I have a button called " Register ". And a button named " Log In ". I want to make this button appears as " Welcome [Login Member's name] " and " Sign Out " respectively when a member log in. And as far as I know this code will go under the " Login Menu ", So how can I do that ?