11 years, 4 months ago
Put the wp-blog-header.php line at the top of your script.
Also try posting on the WordPress forums, as this isn’t really a BP issue.
Run a Loop Outside of WordPress
See also: WordPress.org •
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service