This topic has 3 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #50770
     mitchcan
    Participant

    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!

    #50785
     sharmstr
    Moderator

    Here’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 CODE
    
    function 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #50788
     mitchcan
    Participant

    Thanks, 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…

    #50790
     sharmstr
    Moderator

    Oh 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?