Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the layout of a certain group


  • luvs
    Member

    @luvs123

    Hello, I want to change the layout of one of my groups, but I want all the others to stay the same. Like the support groups on buddypress.org

    How do i do it????

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can use if/else checks for group name using this:

    `if( bp_is_groups_component() && ‘my-group-name’ == bp_current_item() ):`

    Use it to wrap all your new markup in /groups/single/ group-header.php and various template files


    luvs
    Member

    @luvs123

    so like maybe:

    `<?php

    if( bp_is_groups_component() && ‘Support’ == bp_current_item() ):

    // New Group Template Here…

    ?>

    `

    Yes but it will be a little trickier than that as you’ll need to look at the various files that make up a page and what parts you want to allow to show and what new bits you want to write so you’ll likely need an else: in there somewhere to allow the normal page elements to display if this group is not ‘support’. Just a matter of playing around a little, and of course work in a child theme copy of the files.


    luvs
    Member

    @luvs123

    Here is what I came up with
    `<?php

    if( bp_is_groups_component() && ‘Support’ == bp_current_item() ):

    // New Group Template Here…

    <a href="” title=””>

    <a href="” title=””>

    Support Group

    ?>`

    But I get: `Parse error: syntax error, unexpected ‘<'`

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change the layout of a certain group’ is closed to new replies.
Skip to toolbar