Create members page for specific members
-
Hello,
I want to create multiple members pages based on field value.
For example let’s say I have a field called “Team” and values are 1,2 and 3.
I want to create a members page for each teams showing team members.
I found this code to create a function that will filter based on the field value :
function my_custom_ids( $field_name, $field_value = '' )
I fount it HERE
I understood I need to add this code in my-theme/functions.php or in bp-custom.php but after that how can I call this function on the 3 different pages with the 3 different fields values ??
The code on the three pages will be like that if I understood well :
<?php if ( bp_has_members( my_custom_ids( 'Team', '1' ) ) ) : ?>
<?php if ( bp_has_members( my_custom_ids( 'Team', '2' ) ) ) : ?>
<?php if ( bp_has_members( my_custom_ids( 'Team', '3' ) ) ) : ?>
I missed something, I really don’t know where to put the code that call the created function on the new page I created :/
Thank you for your help
- You must be logged in to reply to this topic.