Forum Replies Created
-
I’ve tried custom code using http referrer, buddypress hooks.
Do you have any thing that could help?
I did find this:
https://gist.github.com/mgmartel/4463855+&cd=8&hl=en&ct=clnk&gl=usBut I’m not quite sure how to get it to work. I added it to my functions.php file and the page remains unchanged.
Thoughts anyone??
Still kind of confused. Sorry for the delay between responses. I’ll be more responsive now.
Where should I use the type=alphabetical now?
Here’s my code again:<?php /* Template Name: Buddypress Leadership Template */ ?> <?php get_header(); ?> <?php if ( bp_has_members() ) : ?> <h4 id="executive-header">Executive Board</h4> <div class="leadership-list"> <ul class="members-list executives leadership item-list" role="main"> <?php while ( bp_members() ) : bp_the_member(); ?> <?php global $current_site; $user_id = bp_get_member_user_id(); $memberOf = xprofile_get_field_data( 'Member of' ,bp_get_member_user_id(), $multi_format = 'array'); $jobTitle = xprofile_get_field_data( 'Job Title' ,bp_get_member_user_id()); $companyName = xprofile_get_field_data( 'Company' ,bp_get_member_user_id()); $lastName = xprofile_get_field_data( 'Last Name' ,bp_get_member_user_id()); if ($memberOf != '') { foreach($memberOf as $key => $value){ ?> <?php if($value == "Executive Board") {?> <li class="member-dir-member"> <div class="column-first"> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a> </div> </div> <!-- end column-first --> <div class="column"> <div class="item"> <div class="item-title"> <a href="<?php bp_member_permalink(); ?>" class="member-name"><?php bp_member_name(); ?> <?php echo $lastName ?></a> <div class="job-title"> <?php echo $jobTitle; ?> of </div> <div class="company-name"> <?php echo $companyName ?></div> </div> </div> </div> <!-- end column --> <div class="clear"></div> </li> <?php } ?> <?php } } endwhile; ?> </ul> </div> <h4 id="steering-header">Steering Committee</h4> <div class="leadership-list"> <ul class="members-list executives leadership item-list" role="main"> <?php while ( bp_members() ) : bp_the_member(); ?> <?php global $current_site; $user_id = bp_get_member_user_id(); $memberOf = xprofile_get_field_data( 'Member of' ,bp_get_member_user_id(), $multi_format = 'array'); $jobTitle = xprofile_get_field_data( 'Job Title' ,bp_get_member_user_id()); $companyName = xprofile_get_field_data( 'Company' ,bp_get_member_user_id()); $lastName = xprofile_get_field_data( 'Last Name' ,bp_get_member_user_id()); if ($memberOf != '') { foreach($memberOf as $key => $value){ ?> <?php if($value == "Steering Committee") {?> <li class="member-dir-member"> <div class="column-first"> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a> </div> </div> <!-- end column-first --> <div class="column"> <div class="item"> <div class="item-title"> <a href="<?php bp_member_permalink(); ?>" class="member-name"><?php bp_member_name(); ?> <?php echo $lastName ?></a> <div class="job-title"> <?php echo $jobTitle; ?> of </div> <div class="company-name"> <?php echo $companyName ?></div> </div> </div> </div> <!-- end column --> <div class="clear"></div> </li> <?php } ?> <?php } } endwhile; ?> </ul> </div> <?php do_action( 'bp_after_directory_members_list' ); ?> <?php else: ?> <div id="message" class="info"> <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p> </div> <?php endif; ?> <?php get_footer(); ?>
I do have the BuddyPress to WordPress profile syncing enabled. I did add the code above as you suggested, however it doesn’t list the correct profiles.
Still needing help
Thanks Henry.
I should point out, that I am dealing with radio buttons, not check boxes. Not sure how I mixed those 2 up.
Still needing help here.
Still needing help! Anyone out there today?