custom sidebar buddypress integration

This topic contains 2 replies, has 2 voices, and was last updated by  Paolo 9 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #39546

    viguursthijs
    Buyer
    Post count: 273

    Gentlemen,

    what would you recommend to be the best approach if we want to add a separate sidebar to the combined buddypress/wpgeo-profile pages of our users?

    I find many advices on tweaking the buddypress sidebar.php file, but my guts feeling tells me that this is not the way to go, because the main look and feel is managed by (in our case) the wpgeotheme framework and its child modern theme.

    We’ve succeeded in adding a separate widget area, so that’s fixed, but now we want to add that to the profile page.

    Am I clear enough?

    Thanks again!

    #39622

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    Buddyress uses the default page sidebar.

    Just go into page.php of the child theme and use a conditional tag to make it call your custom sidebar instead of the default sidebar, when needed.

    Buddypres conditional tags are:

    Profile Page:

    
    
    
    if (bp_is_user())

    Users page:

    if (bp_is_directory())

    Others BP pages:

    bp_current_component()

    Example:

    
    
    
    if(bp_current_component('members'))

    To know the name of the page:

    echo bp_current_component();

    These info are already availble in the Buddypress forums too.

    Thank you,

    #39623

    Paolo
    Site Admin
    Post count: 31211
Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount