Fix check for listings
Check post type of global before deleting.