If user is logged in and an admin (show this) else
-
The code I am using is not working. I want it to echo dashboard if an admin or author is logged in and I want it to show profile if a normal user is logged in. This is the code I have so far…
<?php if ( is_user_logged_in() && current_user_can( 'Administrator' ) ) { echo '<a href="">Dashboard</a>'; } else { echo '<a href="/login">Login</a>'; } ?>
This is the start for if an admin logs in. What am I doing wrong?
See my navigation at Scottreinmuth.com for a better understanding
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If user is logged in and an admin (show this) else’ is closed to new replies.