[Resolved] List Members based on extended profile field value
I’m trying to retrieve a specific Members Loop page at BuddyPress with members who chose Yes on a specific Radio Button (which has Yes/No options).
For this, I created an specific Template page at my theme. Found some old topics here on forums and managed to get this code. Unfortunately, my code (below) isn’t working and I came to a dead end. Can anyone help me?
<?php $attend_value = "Yes"; $db_query = "SELECT user_id FROM wp_bp_xprofile_data WHERE field_id = 13 AND value = \"" .$attend_value ."\""; $match_ids = $wpdb->get_col($db_query); $get_these_members = 'include=' .$match_ids; ?> <?php if ( bp_has_members( $get_these_members ) ) : ?>
I receive a “Sorry, no members were found.” even if the field id’s and values from the database are correct. What should be happening?
You must be logged in to reply to this topic.