Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to change the default order of the dropdown options for the ‘post in’ choices when making an act

@a3sthetix

Participant

The key here is this line of PHP:

`<?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0' ) ) :
while ( bp_groups() ) : bp_the_group(); ?>`

Ideally you would want to not output the group right away. You would want the group information to go into a variable for processing. The proper way to do this is with a new plugin or template file.

So grab all the group names `bp_group_name()` and ids `bp_group_id()` into a PHP array and then run a new loop once you’ve resorted the array.

Skip to toolbar