Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display 1 specified Group on the Group member’s Profile Pages.

  • Hello everyone,

    I’m having a bit of a problem trying to customize how to Display 1 specified Group on the Group member’s Profile Pages.

    Basically what I want to do is place an image (the group avatar for this case) under the users avatar if they belong to that specified group.

    This is what I’ve come up with so far in my members/single/members_header.php, however it’s displaying it on all profiles even if they aren’t a member of the group.

    <?php if ( bp_has_groups( ‘type=random&slug=beta-tester&max=1’ ) ) : ?>
    <?php while ( bp_groups() ) : bp_the_group(); ?>
    {avatar picture}
    <?php endwhile; ?>
    <?php else: ?>
    Join the Beta tester group!
    <?php endif; ?>

    If I change the ‘type=random&slug=beta-tester&max=1’ for example,
    1. The group goes away on the members who are NOT apart of the group
    – Working exactly how I want
    2. Displays the ‘Join the Beta tester group’ text if they aren’t a member of ANY groups
    – I would also like it to say this even if they are a member of other groups, which it doesn’t.
    3. However it then shows 1 random group I belong to (which makes since.. it is the random option but it’s not what I want it just works with half of what I want .>” title=”>.>” class=”bbcode_smiley” /> In my case I only want it to show the group ‘beta-tester’.)

    I’ve tried a lot of different things and searched the forums but nothing I’ve tried worked so far >.< If someone could be ever so kind to help me I'd greatly appreciate it! Sorry if I've over explained things I just wanted to make sure I'm clear on how I want this to be displayed, I didn't think it would be as hard as it has been for me to figure it out x_x;

Viewing 1 replies (of 1 total)
  • Just wanted to update to say that I temporarily got it working using:

    bp_has_groups( ‘search_terms=beta&max=1’ )

    The only thing that worries me is that I need to prevent users from registering any groups that have the name ‘beta’ in it now. Is there a way to ‘blacklist’ a certain group name from being created?

    EDIT:
    Seems as though I can just put a space between the search terms so I simply put beta tester and all seems well ^_^

    Now it looks like:
    ( bp_has_groups( ‘search_terms=beta tester&max=1’ )

Viewing 1 replies (of 1 total)
  • The topic ‘Display 1 specified Group on the Group member’s Profile Pages.’ is closed to new replies.
Skip to toolbar