Title: Do a loop for $user_id
Last modified: August 19, 2016

---

# Do a loop for $user_id

 *  [Droiddoll](https://wordpress.org/support/users/droiddoll/)
 * (@droiddoll)
 * [18 years ago](https://wordpress.org/support/topic/do-a-loop-for-user_id/)
 * I want to do a loop for $user_id for current user so… something like this:
    <?
   php if (have_posts()) : while (have_posts()) : the_post($user_id); ?> I know 
   that this is wrong, I’m doing a user menu and I just want to appear current user’s
   post pleaseeee heeelpppp thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/do-a-loop-for-user_id/#post-778292)
 * > I’m doing a user menu and I just want to appear current user’s post
 * then you capture their user_id using the necessary template tags and you display
   an author template.
 *  Thread Starter [Droiddoll](https://wordpress.org/support/users/droiddoll/)
 * (@droiddoll)
 * [18 years ago](https://wordpress.org/support/topic/do-a-loop-for-user_id/#post-778337)
 * thanks for replay whooami, i am already using author.php for the space users,
   I have to do it with another template than author.php
 * thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Do a loop for $user_id’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Droiddoll](https://wordpress.org/support/users/droiddoll/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/do-a-loop-for-user_id/#post-778337)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
