WordPress.org

Ready to get started?Download WordPress

Forums

Get_Post Hook available? (3 posts)

  1. reteep
    Member
    Posted 8 years ago #

    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!

  2. MattRead
    Member
    Posted 8 years ago #

    the_posts hook might be what you are looking for.
    http://wphooks.flatearth.org/hooks/the_posts/

    You can always use the $posts array too. like:

    $posts[0]->ID

  3. reteep
    Member
    Posted 8 years ago #

    Thanks, that's it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags