function add_custom_fields_to_rss() {
if(get_post_type() == 'my_custom_post_type' && $my_meta_value = get_post_meta(get_the_ID(), 'my_meta_key', true)) {
?>
<my_meta_value><?php echo $my_meta_value ?></my_meta_value>
<?php
}
}
add_action('rss2_item', 'add_custom_fields_to_rss');
You should be able to substitute and any other meta values you need to add to the feed.
Related Posts:
- How to Make a Separate RSS Feed for Each Custom Post Type
- How can I generate a RSS feed based on a custom WP_Query?
- Custom post types – RSS lastBuildDate issue
- How to remove CPT comment feed from head?
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Include only recents custom posts in WP rss feed
- Custom taxonomy in custom post RSS feed
- Display custom fields from custom posts in RSS feed
- Creating separate feeds for custom post types
- How to fetch custom post types with its full data on wordpress?
- wp3 custom post types rss
- Disable permalinks, but allow RSS feeds
- WordPress feed only shows first page of category
- Changing the RSS feed titles not working
- Rewrite custom post type rss feed links
- custom post types don’t appear in RSS
- feed links for custom post type pages
- Password-protect a custom rss feed
- How to change the quantity of feeds in custom post type?
- disable /feed/ for custom post type
- Adding posts of custom type into the main feed
- register_post_type – rewrite / feeds, what’s it for?
- How can we disable a custom post type archive page but enable its feed?
- Disable feeds for specific custom post types
- RSS feed for dynamic set of custom taxonomies terms
- Disable comments from showing up public for Custom Post Type
- Add Content Exclusively to a Custom Post Type Feed
- Sub-Sub-Blogs — creating and importing content into a custom sub-type
- How to make custom post type feed title = taxonomies?
- Publish an XML feed from a CPT with ACF fields?
- How to use has_archive but disable feed per post type?
- What is best way to prevent access to Custom Post Types unless authenticated when the post type has an archive and is publicly queryable?
- Add custom post type drafts to RSS feed
- Using a custom post type for an RSS feed only
- Is it possible to have a custom post type with feed but without the archive?
- Custom post type RSS feed, multiple post published on same day bug
- How can I show 1 featured post in a styled element, and the next few below differently styled
- 404 in custom post type feed with mistake permalink
- Custom rewrite to fetch feed data
- wp-includes does not contain a feed template
- How to pass modified post to RSS feed?
- Add Custom Term to RSS Feed Titles
- Generate custom RSS from a plugin
- Filter RSS feed for custom post type to events for next 7 days only
- Get link for feed of specific post type AND taxonomy
- How would you feed Custom Post Types to Facebook?
- How to feed custom post type to a facebook page?
- display posts, pages and custom post types from another wordpress site
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Enable sticky posts to custom post_type
- Displaying a custom post type alphabetically
- How to remove “Archive:” label from archive title
- How do I Paginate Search Results for Custom Post Types?
- Display a list of child posts on parent posts of a custom post type
- Custom post status not working
- Limit the number of posts in query_posts function with custom post types
- “Edit” option for custom post types archive page
- Child pages on hierarchical Custom Post Types 404s
- Custom Post Types: pretty search URLs and has_archive
- Filter posts with ajax form and checkboxes
- Custom Scripts per page or Custom Post Type
- Count posts with specific term_meta
- submenu item edit a specific post
- Confusion regarding Nonce & using it in Custom Columns for Saving Checkbox Value to Post Meta
- How to add a custom taxonomy to show up in a custom post type menu?
- Replace text in post from cvs
- Admin search ACF relationship
- With two custom post types, how to make one a child of the other in the admin menu?
- Selecting a post in Dashboard
- WordPress sort search results by custom order
- Can one create multiple Custom Post Types with a for loop?
- Translating custom post type metaboxes [closed]
- How to change permalink to include custom post type
- Listing all term items alphabetically / sorting loop
- Single page not working for custom post type
- Two column layout with alphabetical ordering
- Which plugin can do horizontal scrolling of RSS feeds in WordPress [closed]
- Custom Post Type “MUST NOT” be able to search via URL
- How to add and display custom content that is not a post
- CPT structure questions
- Adding custom post formatting options in custom post types
- Better in the long run to use post date or custom taxonomy to sort/separate posts by year?
- WordPress Custom Post Loop
- Create posts inside CPT post
- wp delete duplicate entries of custom post types every 15 minutes
- How do I link to a dynamic ACF button from a Custom Post type?
- Show Post columns to specific users on condition
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- How to use costum database table for custom post type
- connect users to Custom post types
- How to solve performance issue caused by custom post type overview with 20k+ custom taxonomy terms
- Custom Post Type Pagination Not Working or Single Posts Displaying?
- Excerpt for each post type and for is_front_page
- Show taxonomies from specific CPT
- Custom metabox value not saving
- Category / Custom Post Type permalink issue
- Comments are not working on Custom Post Type
- Why isn’t page attributes dropdown not showing up in a custom post type
- Query order by a numeric ACF field