[Plugin: Widget Logic] user logged in syntax help
-
Hey guys,
I am trying to script a small amount of php to change a link based on if the user is logged in or not.What I have is :
<?php
if ( is_user_logged_in() ) {
echo ‘Welcome, registered user!’;
} else {
echo ‘Welcome, visitor!’;
}
?>However I dont really understand how widget logic works. When I place this code in my footer widget any text from that widget is removed and nothing is shown. Ive tried changing the settings to load after all php has been loaded since is_user_logged_in() is part of a different php script but still did not work.
Any help is appreciated, thanks!
The topic ‘[Plugin: Widget Logic] user logged in syntax help’ is closed to new replies.