I can't get any help on the buddypress forums so I'm going to ask it here. I'm trying to use conditional tags so I can have a different sidebar for the profile page than the activity page. For some reason the way I have it setup in my sidebar.php still returns the default. Any suggestions?
<?php
if (is_single()){
include(STYLESHEETPATH.'/sidebar-single.php');}
elseif (is_page()){
include(STYLESHEETPATH.'/sidebar-index.php');}
elseif (is_category('fame-game')){
include(STYLESHEETPATH.'/sidebar-fame-game.php');}
elseif (bp_is_user_profile()){
include(STYLESHEETPATH.'/sidebar-act.php');}
else {
include(STYLESHEETPATH.'/sidebar-index.php');}
?>
Link to buddypress conditional statements codex http://codex.buddypress.org/developer-docs/conditional-template-tags/
SOLVED! See answer with comments below given by Boone Gorges. Here is the resolved code.
<?php
if (is_single()){
include(STYLESHEETPATH.'/sidebar-single.php');}
elseif (is_page() && !bp_is_profile_component()){
include(STYLESHEETPATH.'/sidebar-index.php');}
elseif (is_category('fame-game')){
include(STYLESHEETPATH.'/sidebar-fame-game.php');}
elseif (bp_is_profile_component()) {
include(STYLESHEETPATH.'/sidebar-act.php');}
else {
include(STYLESHEETPATH.'/sidebar-index.php');}
?>