wp_post->post_parent object returning 0
kraftner is probably right but I recommand you to stop using global $post. I mean it’s not bad but there are often issues with this big array that can be modified by almost everything running on the wp install. So to me it’s not very safe. I prefer using get_queried_object() and it works quite the … Read more