Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Group Types option display

@boonebgorges

Keymaster

Hi @danbp – Sorry to hear that you’re having issues with the Group Type functionality. Your posts contain a couple different comments and questions, which I’ll try to address separately.

First: An orderby=group_type parameter sounds like an interesting enhancement idea. It’d possibly be even more interesting if we could “group” results by type, but our group loops aren’t easily set up for that.

Group type data is stored in the WP taxonomy tables. This decision was made because groups are in are many-to-many correspondence with types: a group can have multiple types, and a type can have multiple groups. But it does make it difficult to sort by type, both technically and conceptually. Technically, WP itself doesn’t natively allow sorting by taxonomy term for posts. Conceptually, if a group belongs to more than one type – say, ‘aaa’ and ‘zzz’ – it’s not clear where in the alphabetical order it should go.

That said, if you really wanted to sort by type, you could do it by filtering the group query SQL, and joining against the term_relationships and term_taxonomy table. The query would have to look something like this:

SELECT ... JOIN $wpdb->term_relationships tr ON (tr.object_id = g.id) JOIN $wpdb->term_taxonomy tt ON (tt.term_taxonomy_id = tr.term_taxonomy_id) WHERE ... tt.taxonomy = 'bp_group_type' ... ORDER BY tt.name

> And when you click for example on All Groups (the default group directory page) you remain on /groups/groupname/type/typename/. Bad UX !

For 2.7, we’re disabling AJAX for these queries, because of these UX concerns. Thanks for reporting the issue.

> My feeling about group type, is that it is implemented to be used inside of group create step first and in a single group as second. In brief, it’s an information for single groups.

As I see it, the issue here is that you’re trying to combine grouping-by-type with the groups loop. Your use case is valid, but I don’t think it’s the only, or even the primary, use of group types. Just having the ability to filter by group type (example.com/groups/type/foo) is very useful for many implementations.

Thanks for sharing your thoughts – it’s really helpful as we continue to improve the group types feature.

Skip to toolbar