Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 24,029
- How-to & Troubleshooting
- 129,662
- Creating & Extending
- 25,794
- Requests & Feedback
- 9,497
- Third Party Plugins
- 9,793
- Showcase
- 3,316
- Ideas
- 1,374
- Miscellaneous
- 9,181
-
You’ll have to declare $bp as a global variable in your function, so you can access it in your function.
global $bp;
echo $bp->displayed_user->id; //Should work fine