Title: Get_Post Hook available?
Last modified: August 18, 2016

---

# Get_Post Hook available?

 *  [reteep](https://wordpress.org/support/users/reteep/)
 * (@reteep)
 * [20 years ago](https://wordpress.org/support/topic/get_post-hook-available/)
 * Hello there,
 * there’s a get_comment_id() Hook available but I can’t find one for posts.
 * I need the ID of the Post which is being shown. So in fact the ID of the Post
   on which the user clicks.
 * Is that possible?
 * Thanks!

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

 *  [mattread](https://wordpress.org/support/users/mattread/)
 * (@mattread)
 * [20 years ago](https://wordpress.org/support/topic/get_post-hook-available/#post-379757)
 * `the_posts` hook might be what you are looking for.
    [http://wphooks.flatearth.org/hooks/the_posts/](http://wphooks.flatearth.org/hooks/the_posts/)
 * You can always use the `$posts` array too. like:
 * `$posts[0]->ID`
 *  Thread Starter [reteep](https://wordpress.org/support/users/reteep/)
 * (@reteep)
 * [20 years ago](https://wordpress.org/support/topic/get_post-hook-available/#post-379890)
 * Thanks, that’s it!

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

The topic ‘Get_Post Hook available?’ is closed to new replies.

## Tags

 * [get](https://wordpress.org/support/topic-tag/get/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [id](https://wordpress.org/support/topic-tag/id/)

 * 2 replies
 * 2 participants
 * Last reply from: [reteep](https://wordpress.org/support/users/reteep/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/get_post-hook-available/#post-379890)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
