If Logged In
-
Hello,
Im trying to set up a user pannel which will have links to diffrent pages on the site i found this php code
<?php if ( is_user_logged_in() ) { echo 'Welcome Registerd User'; } else { echo 'Welcome, visitor!'; }; ?>
and i want to use this for when they are logged in
<ul> <li>User Pannel</li> <li><a href="https://doctorwhohd.com/profile/" target="_self">Profile</a></li> <li><a href="https://doctorwhohd.com/edit-profile" target="_self">Edit Profile</a></li> <li><a href="https://doctorwhohd.com/activity/" target="_self">Recent Activity</a></li> <li><a href="https://doctorwhohd.com/friends/" target="_self">My Freinds</a></li> <li><a href="https://doctorwhohd.com/request/" target="_self">Friend Requests</a></li> <li><a href="https://doctorwhohd.com/directory/" target="_self">User Directory</a></li> <li><a href="https://doctorwhohd.com/logout/" target="_self">Log Out</a></li> </ul> </div>
i will use this where it says welcome registered user.
It works find but the CSS style goes and im just left with text how do i keep the css style in the php style would be great if someone could help me
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If Logged In’ is closed to new replies.