fix for issue #5531

Some plugins or themes when using WordPress native function like get_queried_object() may expect having access to post_type or it's ancestors. In this specific issue both was needed. So like you have already added ID, post_title and post_name... I just appended post_type and ancestors.