Support » Plugins and Hacks » Widget & Dynamic sidebar – can I do this?
9 years, 7 months ago
Currently I have a dynamic sidebar – visitors get one sidebar, logged in users get a different one. This is done via the code that follows. Can I add widgets to the logged-in user version and not the Guest version? How would I do that?
global $user_login, $user_identity;
if ($user_login) :
<h2>Welcome back<br><?php echo $user_identity; ?>!</h2>
<?php else : ?>
<li><h2>Welcome Guest! </h2>
You could use an ExecPHP widget…