Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin to show components to registered Users only

I’m my case… I’ve simply decided in home.php to wrap the “first-section” widgets with logic that will show that widget section only to logged in users… otherwise it is replaced with a positioning statement + calls to action (i.e. Join! Donate! Learn!) and a wordpress loop. Pretty simple stuff:

<?php if (!is_user_logged_in()) { ?>

[static content & wordpress loop for the public]

<?php } else { ?>
<?php if(!function_exists('dynamic_sidebar')||!dynamic_sidebar('first-section')):?>

[widgets for members only (i.e. site activity) ]

<?php endif; } ?>

Skip to toolbar