How can I retrieve the current member id within members-loop.php
How can I retrieve the current member id when running through the members-loop.php?
The following ways don’t work(I’ve already tried them.)
`$bp->loggedin_user->id`—This just repeats because there is only one logged in user from his/her logged in perspective.
`$bp->loggedin_user->id`—This just returns false for all members because this is from the main members loop not on any specific profile page.
Ultimately I’m trying to perform a query in members-loop.php like the following.
`if ( bp_has_members( ‘type=online&search_terms=’.$CURRENT_MEMBER_ID))`
How can I pull the current member’s id???? Any help would be greatly appreciated.
You must be logged in to reply to this topic.