Re: Buddypres query_posts by user
A ‘global’ makes a variable available in different scopes – a function creates a new scope and code or variables that exist outside the function need to be passed through:
`global $bp;`
However if you are on a bp screen? you likely don’t need to pull out parts from the $bp global you should be able to use ‘bp_displayed_user_id()’