Opened 8 years ago
Closed 8 years ago
#7145 closed enhancement (wontfix)
Looking for a group query action similar to bp_pre_user_query_construct
Reported by: | rekmla | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | reporter-feedback |
Cc: |
Description
I have not found a filter that allows changing the group query prior to execution similar to the way 'bp_pre_user_query_construct' allows one to modify the user query.
Suggested filter 'bp_pre_group_query_construct' attached. Happy to use an alternative, if one exists.
Attachments (1)
Change History (3)
#2
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Thanks @r-a-y, bp_parse_args()
works for templates and works in wp-admin. Neither approach works for groups_get_groups
, but I can pass args to groups_get_groups
.
We're filtering groups in a multi-network setup and haven't yet found all places where groups might need to be filtered on a given commons. Since the existing filter works, this ticket can be closed.
Can you try the
bp_parse_args()
technique?https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/
Instead of using
BP_Groups_Template
, you would focus onbp_has_groups()
.If that doesn't work, let us know.