Title: Show posts by current user
Last modified: October 23, 2018

---

# Show posts by current user

 *  Resolved [jakedold](https://wordpress.org/support/users/jakedold/)
 * (@jakedold)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/show-posts-by-current-user/)
 * I am trying to use a short code to display posts only by the currently logged
   in user. I saw a thread on here from about 6 months ago that said to use the 
   following short code [display-posts author=”current”], but for some reason that
   is not working. I thought maybe there was a problem with the plugin, but I can
   make other short codes work like [display-posts author=”jakedold07@gmail.com”].
 * Do I have anything wrong that is causing this issue?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshow-posts-by-current-user%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/show-posts-by-current-user/#post-11049349)
 * Hmm, it’s hard to say what’s causing that issue.
 * Since you say normal author queries work but the “current” one doesn’t, that 
   leads me to think this is a caching issue. I recommend speaking with your host
   to ensure logged-in users aren’t getting a cached copy of the page.
 * You can share with them [this code](https://github.com/billerickson/display-posts-shortcode/blob/819b52ff1860971c3fe171903f4b189747a934f0/display-posts-shortcode.php#L286-L287)
   that checks if the current user is logged in, and if so uses that user for the
   author.
 * My guess is the page is generated once (by a non-logged-in user) with no results,
   cached, then that same one is served up to the logged in users.
 * I hope that helps
 *  [ztfreak](https://wordpress.org/support/users/ztfreak/)
 * (@ztfreak)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/show-posts-by-current-user/#post-11259146)
 * I’m not sure if it is causing the problem, but you are using `”` instead of `"`.
   When I tried using ” it didn’t work for me.
    -  This reply was modified 7 years, 3 months ago by [ztfreak](https://wordpress.org/support/users/ztfreak/).

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

The topic ‘Show posts by current user’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)
 * [current user](https://wordpress.org/support/topic-tag/current-user/)

 * 2 replies
 * 3 participants
 * Last reply from: [ztfreak](https://wordpress.org/support/users/ztfreak/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/show-posts-by-current-user/#post-11259146)
 * Status: resolved