topbar login / logout with a welcome message
-
Hi hannan
sorry i wast trying to figure it out by me self but failed.
all i wanted to do is, add an option on the top bar where there will be an option of login and log out option with a welcome message when the user is logged init will show “Good Day User ID | Logout”, therefore i have managed to get the option on to topbar by adding in heared-topbar.php
<div class="user-status"> <?php if (is_user_logged_in()) { $user = wp_get_current_user(); echo 'Welcome back '.$user->display_name.'! ', wp_loginout(); } else { ?> Please <strong><?php wp_loginout(); ?></strong> or <a href="<?php echo get_option('home'); ?>/wp-login.php?action=register"> <strong>Register</strong></a> <?php } ?> </div> <!-- end user status -->
the links are working fine. the only problem i have is, it turning up in different way in different devices. also Ive added the above code after the following lines in heared-topbar.php
</div> <div class="user-status">
do you follow?
is there any solution to resolve these issue?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘topbar login / logout with a welcome message’ is closed to new replies.