Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Using bp displayed user to query posts

@shanebp

Moderator

I can guess why author may != the meta value, but it would be a lot easier if you stored the user id in that meta value field.

Anyhow, you could use get_user.
$person = get_user_by('id', bp_displayed_user_id());

then

...
'meta_value' =>  $person->user_login
...
Skip to toolbar