Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,484
- How-to & Troubleshooting
- 127,649
- Creating & Extending
- 25,621
- Requests & Feedback
- 9,375
- Third Party Plugins
- 9,703
- Showcase
- 3,317
- Ideas
- 1,317
- Miscellaneous
- 8,822
-
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
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS