-
Author
Tagged: buddypress, sidebar, groups. layout
-
March 19, 2015 at 00:59 #50770mitchcanParticipant
Hello,
In Kleo > Theme Options > BuddyPress, the Default layout is set to ‘right sidebar’. The Groups Layout is set to ‘Full width’.
On the site pages, the Group Directory page (e.g. url/groups) is displayed as full width, as expected. But I want to display the Group and (sub Group and Group Forums) individual pages (e.g. url/groups/groupname/ and e.g. url/groups/groupname/forum) as ‘right sidebar’
How do I do that?
Thanks!
March 19, 2015 at 02:22 #50785sharmstrModeratorHere’s the function kleo uses to figure out how to display buddypress components. You can put it in your functions.php file and edit
COPY CODEfunction kleo_bp_change_layout($layout) { global $bp; if (!bp_is_blog_page()) { $layout = sq_option('bp_layout', 'right'); //profile page if (sq_option('bp_layout_profile', 'default') != 'default' && bp_is_user()) { $layout = sq_option('bp_layout_profile', 'right'); } elseif (sq_option('bp_layout_members_dir', 'default') != 'default' && bp_is_current_component($bp->members->slug) && bp_is_directory() ) { $layout = sq_option('bp_layout_members_dir', 'right'); } elseif (sq_option('bp_layout_groups', 'default') != 'default' && bp_is_current_component($bp->groups->slug) ) { $layout = sq_option('bp_layout_groups', 'right'); } elseif (sq_option('bp_layout_activity', 'default') != 'default' && bp_is_current_component($bp->activity->slug) && !bp_is_user() ) { $layout = sq_option('bp_layout_activity', 'right'); } elseif (sq_option('bp_layout_register', 'default') != 'default' && bp_is_register_page() ) { $layout = sq_option('bp_layout_register', 'right'); } } return $layout; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
March 19, 2015 at 02:39 #50788mitchcanParticipantThanks, I’ll go see what I can get accomplished with this. I don’t understand much of it, but I’m not afraid of some trial and error (and error and error). 🙂
If I can’t get it figured out, I’ll come back and visit…
March 19, 2015 at 02:43 #50790sharmstrModeratorOh shoot. I assumed, based on other stuff you’ve done, that you’d be able to sort it. Give it a go. Most of it is checking the for what you have set in theme options… the sq_option bit. So at the top I’d put a “is this the groups directory” so it stops processing there and never looks at the theme options settings. I just dont know off the top of my head what the bp function is for checking for that. Probably something like is_bp_group_dir lol 🙂
let me know if you get stuck.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.