Title: post_type: attachment
Last modified: March 28, 2019

---

# post_type: attachment

 *  Resolved [mmjaeger](https://wordpress.org/support/users/mmjaeger/)
 * (@mmjaeger)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/post_type-attachment/)
 * Hello
    quick question – I got the plugin to show attachments – that was quite
   easy – thanks for that – however, I was wondering how I actually could display
   the attachment / image – I’m using a template and by setting a global $post, 
   I think I’m actually able to get the post ID/attachment ID – is that the right
   way to do it – I don’t see that the post ID is actually passed to the “display_posts_shortcode_output”
   filter.
 * thanks again for your help

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/post_type-attachment/#post-11449904)
 * Yes, you can access the global $post variable, or you can use `$id = get_the_ID();`

Viewing 1 replies (of 1 total)

The topic ‘post_type: attachment’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/post_type-attachment/#post-11449904)
 * Status: resolved