Using member types tabs for custom members directory filter
-
The system I’m building assigns members to particular local authorities, and each local authority has a particular member selected as the ‘primary contact’. On my BP members directory listing, I want to add a tab next to ‘All Members’ to just list ‘Primary Contacts’. I’m going to have to do some synching of metadata to then make it possible to filter the members loop for this – which should be fine. I’m just having trouble with the interface aspect.
If I use the hook
bp_members_directory_member_types
to add a tab, the tab seems to automatically be hooked into an AJAX-based system which I can’t easily decipher.Should I be looking at registering ‘primary contact’ as a BP member type? And then the tab / filter will be added automatically? It’s just that we might want to use member types for something else, and I’ll have to do a different load of metadata synching to hook a type assigned to a member with the data that connects them as the primary contact for a local authority. Again, possible, but I’m not sure if that’s heading in the right direction.
Or is there a way to add a custom tab that’s outside the member types system, especially the AJAX which is preventing just reloading the listing with a query parameter to filter.
I’m on the latest versions of WP and BP.
- You must be logged in to reply to this topic.