Inside the loop, you can get the currently iterated user id using bp_get_member_user_id()
.
Also, it’s best practice to use bp_get_user_meta()
, because it works better with certain kinds of BP plugins (multi-network, etc).
Thus:
if ( bp_has_members() ) {
while ( bp_members() ) {
bp_the_member();
$user_last = bp_get_user_meta( bp_get_member_user_id(), 'last_name', true );
}
}
Related Posts:
- How to get a buddypress user profile link and a certain user profile field for the current post author?
- How to get Viewing profile ID in buddypress? [closed]
- Save buddypress xprofile data to author meta
- Integrating Buddypress, Wootumblog and WPMU Sitewide tags
- BuddyPress: Allow only one email domain to register
- Ability to set character limit in BuddyPress?
- wp_editor on front end – JavaScripts not included
- Buddypress Full documentation [closed]
- How to force buddypress users to complete profile after registration? [closed]
- WP_User_Query with combined meta query – not working?
- how to get current user name by user_id in buddypress?
- How to add follow functionality to multi-author wordpress site?
- Search multiple meta keys at once
- How to override Member’s Avatars in BuddyPress [closed]
- Buddypress send email notification only if user is not logged in [closed]
- Delete all user attachments
- Login redirect to certain bp profile page
- Buddypress and WordPress on different subdomains with the same database?
- delete_user_meta Delete one value out of array
- BuddyPress Xprofile check if user can view field [closed]
- How to reply to Buddypress notifications? [closed]
- I’m trying to Add a new Buddypress menu tab and it is not showing up [closed]
- How to get larger version of author avatar
- How to run scripts when a new blog is created in Buddypress?
- Showing the user’s username in registration email or activation page with BuddyPress [closed]
- Display four buddypress activies [closed]
- How to remove unused avatar uploads in buddypress [closed]
- cubepoints/buddypress show new rank on activity? [closed]
- Is it possible to have a network of BuddyPress sites, a-la WordPress MU, with single-sign-on? [closed]
- delete a photo tag in rtmedia [closed]
- Table ‘wp_signups’ doesn’t exist [closed]
- How to edit buddypress templates? [closed]
- Is there a plugin or something that allows you to use BuddyPress without having to create a BuddyPress-ready theme?
- Filter WooCommerce Orders query with user meta data
- Buddypress – adding custom post to members
- WP_user_query throws a 404 error
- BuddyPress – Get a List of Defined xProfile fields [closed]
- Best practices for securing a Buddypress installation?
- After Upgrade to Buddypress 1.2.6 from 1.2.5.2 , admin bar area displayed incorrectly for guest-visitors
- User-based media gallery
- Customizing the BuddyPress blog loop
- BuddyPress returning incorrect xprofile date [closed]
- Using WordPress as an API [closed]
- Display message on homepage when new user account is activated
- Plugin will sort users by usermeta
- How to carry over existing wp users to a new buddypress installation [closed]
- How to create a customized logout URL in BuddyPress
- BP Profile search results won’t link to user’s profile page [closed]
- Capture Webcam Video within Buddypress (and BuddyPress Media) [closed]
- BuddyPress: Conditionally filter directory based on Xprofile Field [closed]
- Will multiple BuddyPress groups slow down a site? [closed]
- Showing content to specific BuddyPress Member Types
- Format Buddypress Date Picker Output [closed]
- WordPress SEO plugin (by Yoast) and BuddyPress [closed]
- security issue in wordpress?
- Truncate latest activity in buddypress
- How can I display a buddypress group name in the header.php so that it shows when viewing each single group? [closed]
- User Meta Value not echoing despite Var_Dump Showing correct string
- Fill the content of newly added Profile Tab (BuddyPress)
- Change xprofile visibility options in Buddypress [closed]
- How to get all users that uploaded avatars or have gravatars? [closed]
- Problems with redirecting a BuddyPress custom subnav item [closed]
- how to make all buddypress users status “recently active”? [closed]
- Buddypress Language Files Question [closed]
- how to remove header from registration page? [closed]
- Customize Activity Stream – Buddypress [closed]
- I’m trying to use the Group Extension API in BuddyPress but keep getting a fatal error [closed]
- BuddyPress user bio in profile [closed]
- Is it possible to use WP_USER_QUERY to search by username using a wildcard? [closed]
- Displaying the errors from my BuddyPress script
- How to add a new variable to blog creation form?
- BP Profile Search with limited range
- Random 404 errors using Buddypress
- validation email signup form buddypress
- How do I echo all users’ display_name and their meta_value who have a certain meta_key?
- WordPress Buddypress changes groups position
- Redirecting non-logged in users trying to view Group pages but not the Group directory
- get_user can’t read variable
- adding xprofile for this user
- Add usermeta on Buddypress register
- Code correction – Hide a profile from visitors with a specific role
- How to customize BuddyPress Notification triggers?
- Unusual high query of user meta data
- Buddypress profile link on author blogroll page
- Get meta_query value by user meta array
- How to add “create page” option for users in buddypress like facebook?
- how to create buddypress shortcodes?
- Strange issues on sign up form
- How can I place ad code after every 5 activities in BuddyPress activity loop?
- Where am I gaining 6px height retrieving buddypress avatar [closed]
- Buddypress registration page hangs [closed]
- Adding custom HTML to each profile group tab [closed]
- WordPress/BuddyPress plugin to allow users to create members-only posts [closed]
- Saving Custom Fields Defined in BuddyPress’ register.php
- buddypress bp_core_add_message() doesn’t fire why? [closed]
- How to disable buddypress top mini adminbar [closed]
- Get all user with both meta_value
- Bp-reshare alternative [closed]
- BuddyPress Activity Stream – Remove/Replace […] from blog post excerpts
- BuddyPress Xprofile Field Meta Key?