How can I check if I am logged in?
-
Hi,
I want to show some links in the sidebar of my page only if I am logged in, e.g. “New Post”, “Edit Theme”, “Manage” etc., so that I have direct access and do not have to go via the admin panel – saves some clicks, you know. ??
First, I tried
<?php if (!$user_ID) { ?> (I would set up the link list here) <? } ?>
That didn’t work, meaning the link list would not show up at all.
Then, I tried
<?php if (!$user_login) { ?> (I would set up the link list here) <? } ?>
That didn’t work either, because now the list would show up even with me not being logged in.
FORGET IT!
I just realized the “!” = NOT in front of the variable… DAMN!Rechecked and edited…
but erasing “!” does not change anything: the list would not show up…Any suggestions?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How can I check if I am logged in?’ is closed to new replies.