Community Support Forums — WordPress® ( Users Helping Users ) — 2010-07-07T16:52:30-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=322 2010-07-07T16:52:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=322&p=1432#p1432 <![CDATA[Re: Blocking widgets on homepage only?]]> There are other ways around this, but my favorite solution ( most elegant I think ), is to have your theme implement two different Sidebars. In your theme file, usually inside the file "sidebar.php", you can do something like this:

register_sidebar(array ("name" => "Default Sidebar", "description" => "Visible to public."));
register_sidebar(array ("name" => "Member Sidebar", "description" => "Only for Members."));


Code:
<?php

if(is_user_logged_in())
    {
        dynamic_sidebar ("Member Sidebar");
    }
else
    {
        dynamic_sidebar ("Default Sidebar");
    }
?>

Once you have that in place, you can manage everything gracefully through the Appearance -> Widgets menu in WordPress. The s2Clean Theme works like this. It also uses two separate menus for navigation as well.

Statistics: Posted by Jason Caldwell — July 7th, 2010, 4:52 pm


]]>
2010-07-02T12:01:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=322&p=1367#p1367 <![CDATA[Blocking widgets on homepage only?]]> I have a site configured to only allow access to the homepage, login, and registration elements. The site is a WP/BP site at http://www.mspboards.com and its a social networking site for IT and MSP folk. I want to be able to include the BP widebar widget which shows the avatars of all recent users, but it also shows up on the homepage where non-members can see it. Is there anyway to prevent this from happening? One of your magical URI replacements, probably?

BTW, thanks for the fantastic plugin, as it is exactly what I needed. I think you could easily claim a powerhouse hattrick by generating a version which does all of the blocking and member control, but doesn't involve any of the pay stuff. MSPBoards is open and free for all. The PayPal integration may turn some people off.

Thanks!

Tyler

Statistics: Posted by mobodojo — July 2nd, 2010, 12:01 pm


]]>