• Resolved pjonori

    (@pjonori)


    Hi guys, I’m trying to get the reference to a post’s post_parent (an image attachment). I noticed in the posts db table that all published posts have a post_parent of 0, however the revisions of the post stored in the db do contain the correct post_parent ID.

    How do I get the correct post_parent ID from the published post ID when the published post that’s accessible in the loop doesn’t seem to store that information?

    Thanks ahead of time.

  • The topic ‘post_parent shows up as 0 for published post’ is closed to new replies.