Seperate loginout links
-
I’ve been trying to figure this out for a while now but I can’t. I have a text link in my header that shows “Login” when a user is not logged in, and “Logout | Dashboard” when they are logged in.
The problem is, I have the text where I want it when the user is logged in, but when they are not logged in the “Login” text appears too far to the left. I need to style them seperatly, but I don’t know how.
this is the line of code I’m using.
<div id="login-form"> <?php if ( is_user_logged_in() ) { echo "<a href='" . get_option('siteurl') . "/wp-admin/'>Dashboard</a> |"; } ?> <?php wp_loginout('/index.php'); ?> </div><!-- #login-form -->
I guess I need to add another div in the line somewhere, but I can’t figure out where or even if that’s what I need to do.
https://zeaks.org is the site, you can see the login link at the top should be more towards the right, if i move it, then the text when the user is logged in is too far right.
- The topic ‘Seperate loginout links’ is closed to new replies.