is_user_logged_in() Not Working
-
Hi all! I’m using the “Insert PHP” plugin on my site. I am trying to display an image based on whether a user is logged on or not. A simple “echo” works but if I add a line to display a JPEG then nothng is displayed at all (not even the echo). This is my code :
[insert_php]
if ( is_user_logged_in() ) {
echo ‘YOU ARE LOGGED IN!’;
} else {
echo ‘NEED TO LOG IN!!!!’;
<p style=”text-align: center;”><img src=”https://www.nal.pm/wp-content/images/LOGIN.jpg” alt=”” /></p>
}
[/insert_php]
If I remove the line that displays LOGIN.JPG then it works, ie, the ECHO is displayed, but if I leave it in then NOTHING is displayed, ie, neither the JPEG or the ECHO.
Any ideas?!Thanks, Ade.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘is_user_logged_in() Not Working’ is closed to new replies.