Slider or list of members of a group
-
Hi.
I have a Buddypress group where the users are collaborating with our community and I would like to open a section in my home as a “thank you” that lists the members of this particular group.The perfect thing would be to show them in slider form, but with a list would be enough.
How can I do this?
Thanks and greetings in advance.
Wordpress version: 4.8.1
Buddypress version: 2.9.1
Link to site: http://www.racingonlineclub.com/
-
Use
bp_group_has_members
and specific the id of the group.
For example:<php if ( bp_group_has_members( 'group_id=15' ) ) : ?>
etc.Thank you very much for your quick response, it works almost perfect.
You can see it here: http://www.racingonlineclub.com/#agradecimientos
First of all I can not include administrators and moderators.
Is not this correct?
<? php if (bp_group_has_members (‘group_id = 1 & per_page = 20 & exclude_admins_mods = false’)):?>
And secondly I would like the name “bp_group_member_link” to appear under the avatar to better organize the grid.
Is this possible?
Currently the list is:
<li style = “display: inline;”>
<! – Example template tags you can use ->
<? php bp_group_member_avatar ()?>
<? php bp_group_member_link ()?>
</ li>Thanks again.
Try 0 instead of false:
<?php if (bp_group_has_members ('group_id=1&per_page=20&exclude_admins_mods=0')) : ?>
Re layout: you’ll have to check those functions for filter hooks and use those to adjust layout. Or make your own calls.
Thanks, it works.
Although I would have preferred a single-line slider, passing users, at the end, I got the fixed style exactly as I wanted it.
Thank you very much for your help.
- You must be logged in to reply to this topic.