Title: post get author always gets admin
Last modified: August 30, 2016

---

# post get author always gets admin

 *  [melsearch](https://wordpress.org/support/users/melsearch/)
 * (@melsearch)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/post-get-author-always-gets-admin/)
 * HI, I have a widget from a theme which displays the latest post. I have modified
   the widget file to get the post from a custom post type and used get_the_author_id();
   to embed the authors id into the post link so it goes to their profile instead
   of the post itself.
 * the problem is that the post ID is always the admins ID. and the link only goes
   to the admins profile page.
 * in the wp admin, the author of the post displays correctly.
 * how could this be?
 * thanks in advance

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/post-get-author-always-gets-admin/#post-6796649)
 * what exact code have you used in the modification?
 * can you post the full widget code?

Viewing 1 replies (of 1 total)

The topic ‘post get author always gets admin’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/post-get-author-always-gets-admin/#post-6796649)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
