Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,892
- Creating & Extending
- 25,913
- Requests & Feedback
- 9,553
- Third Party Plugins
- 9,834
- Showcase
- 3,316
- Ideas
- 1,404
- Miscellaneous
- 9,183
-
You’re probably calling the BP function before BP has loaded.
Read this: https://codex.buddypress.org/plugindev/checking-buddypress-is-active/
There may be additional problems with your code including the issue raised by @henrywright