Add Taxonomy Values Within a Custom Post Type RSS Feed
get_post_meta is only for custom fields. If listing_category and listing_type are in fact taxonomies, you need to use get_the_terms instead. The resulting code would be something like this: add_action(‘rss2_item’, ‘yoursite_rss2_item’); function yoursite_rss2_item() { if (get_post_type()==’listings’) { $fields = array( ‘listing_bedrooms’, ‘listing_city’, ); $post_id = get_the_ID(); foreach($fields as $field) { if ($value = get_post_meta($post_id,$field,true)) { echo … Read more