Hi, I’m using buddypress and in a custom user tab I’m trying to display that users posts. (displayed user, not logged in user).
I wrote this query and by my understanding it’s correct but it’s not working for me. It should pull the ‘displayed users’ posts only, instead it shows all posts. How Can I make it pull only posts by the “displayed user”? By Buddypress Codex “$bp->displayed_user->id” would be the variable.
query_posts( 'author=' . $bp->displayed_user->id ); // the Loop while (have_posts()) : the_post(); the_content( 'Read the full post »' ); endwhile;
What am I doing wrong?
Thanks a ton!
- The topic ‘query_posts by author’ is closed to new replies.