Changed post type lookup to use wordpress function to detect post types registered by code and those without items