[SOLVED] Exclude sidebar for logged-in user
Jugglead,
first of all you are a star of this forum -- I just sent you a small token of appreciation. I saw your earlier reply to a question about how to reverse the include/exclude logic for sidebar inclusion (ie. to have the "exclude sidebar on pages X" become "include sidebar on pages X". My question a bit different, I want to EXCLUDE the sidebar for all logged-in users (it's a membership site and for non-logged in users I want to show advertisements). I would setup a right sidebar for all my posts and then tweak that with a if(... && !is_user_logged_in() ) { Show the sidebar... I am hoping you can point me in the right direction thanks! |
|
Edit the lines (389, 400, 411 and 422) in bfa_get_options.php and change them from
HTML Code:
if ( $bfa_ata['leftcol_on']['page'] AND !in_array($current_page_id, $pages_exlude_left) ) { HTML Code:
if ( $bfa_ata['leftcol_on']['page'] AND in_array($current_page_id, $pages_exlude_left) AND !is_user_logged_in() ) { This will cause any page mentioned in the exclude list, not to display if you are logged in. |
STB - the plugins will prevent the widgets showing, but the sidebar will still be there. You'd need the code to keep the entire sidebar from showing
|
thanks guys. I actually wanted to disable sidebar for logged-in users on POSTS but I found this a bit below the code you mentioned above (after a long "if"):
PHP Code:
and replaced it with PHP Code:
thanks for your help! |
All times are GMT -6. The time now is 09:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.