The RSS2 feed is generated in the wp-includes/feed-rss2.php
file. In this file, there is an action hook named rss2_item
. You can use this action hook to add tags to each item in your feed.
There is a codex article on rss2_item
with examples, including this one for adding an <image>
tag:
<?php
add_action('rss2_item', 'add_my_rss_node');
function add_my_rss_node() {
global $post;
if(has_post_thumbnail($post->ID)):
$thumbnail = get_attachment_link(get_post_thumbnail_id($post->ID));
echo("<image>{$thumbnail}</image>");
endif;
}
?>
Related Posts:
- RSS/Atom feeds invalid, “Mismatched tag” errors
- Embedded Feed Update
- Feed RSS problem on WordPress, need it for Google News
- WordPress Feed Error [closed]
- Get all posts in RSS
- How to add post featured image to RSS item tag?
- How to get SimplePie fetch_feed without stripping iframe code?
- Remove or Edit in Feeds
- Cannot get add_feed to work
- Should I provide RSS or Atom feeds?
- Why does Simplepie return feed items in a wrong order?
- How to create additional full text RSS feeds
- Custom RSS feed forces download
- Multiple category RSS feeds
- How to flush feed? Or set timeout on feed so that it isn’t cached?
- How to get the last updated date of a post from a WP RSS feed?
- How to remove published date from RSS feed
- Disable only the main feed?
- WordPress Add [cdata] to title tag in rss feed
- A function to fetch blog content via rss feed
- RSS feed site image custom resolution
- Difference between the 4 Built in RSS Feeds?
- How do I Import an RSS feed as WordPress posts without duplicates?
- RSS Feed Behaviour (Inc. Feedburner)
- How can I minimize the content of my RSS feed to fit more items in Feedburner’s 512k limit?
- Two RSS feeds, different items limit?
- How to Create RSS Feeds for categories in WordPress?
- Importing multiple RSS feed into WordPress and sorting them by date
- Custom RSS does not work for categories and tags
- how improve website mainpage loading
- Add ![CDATA] to permalink rss
- Various WordPress Feeds for Same Blog
- How to set the cache for the built-in SimplePie feed parser?
- Custom RSS feed with custom url
- Showing Post ID on RSS
- WordPress – Sync wordpress post with JSON feed
- fetch_feed works on localhost but not on server
- WordPress appends RSS item with unwanted content
- Feed only showing 1 result? [closed]
- Where does WordPress default SimplePie save cache data?
- How to Fetch Rss Feeds From Other Websites
- Feed links not working even with add_theme_support(‘automatic-feed-links’)
- What’s a good RSS Importer?
- Is there a way to fetch RSS feed by date range rather than number of items?
- RSS Feed Empty in Firefox
- fetch_feed returning rss feeds on same server as empty
- Custom Feed URLs
- Remove ‘More..’ link from RSS feed
- Feed error: A feed could not be found at youtube.com/… (1 post) [closed]
- Getting Thumbnail in fetch_feed from custom field
- How do I use fetch_feed() to pull in a large number of posts?
- Create an RSS feed of all posts
- Unable to display favicon using get_favicon()?
- Empty RSS Feeds
- Reply via email (mailto link) in RSS feed at the end of each post
- Rss error in first line of xml : not well-formed (invalid token)
- Second page of RSS feed
- How to make an RSS feed to show most viewed posts for last 24 hours?
- WordPress RSS feed?
- WordPress content on non-WP site residing on a remote domain — how to display posts?
- fetch_feed showing only first item
- RSS feed widget for specific categories with latest posts?
- WordPress won’t let me use a page slug of ‘feed’
- WordPress keeps truncating my feeds and I can’t stop it
- Showing RSS feed via fetch_feed. How to show the site title of the feed?
- Style wordpress image captions in RSS
- My WordPress installation isn’t updating the feed when a new post is published
- RSS feed error stopping parsing of page template
- Use Feedburner instead of default feed on WordPress.com?
- WordPress create custom XML RSS feed template
- What is the difference between these GUID’s in wordpress feed?
- Change pubDate in rss feed in another format
- How to remove private posts from RSS feeds?
- RSS – This XML file does not appear to have any style information associated with it. The document tree is shown below
- Fetch feed from multiple sources
- Theme’s functions.php not called when rendering RSS feed
- Modify RSS feed to change iframe structure
- RSS Feed cURL error 52?
- Update postdata without creating duplicate on wp_insert_post from RSS feed
- Adding a second RSS feed
- WordPress removes namespace part from my tags in RSS feed
- How to import and parse RSS feed from a WP site to a non-WP if ‘allow_url_include’ is set to ‘off’?
- accessing my mu-plugins from within a template file
- wp_head hook content showing up at top of RSS feed
- Show posts without content in RSS 2 FEED
- are there any downsides to increasing the number of most recent items in a feed
- How to make my feed tidy
- RSS feed not displaying excerpt text?
- Create a “feed” from one WordPress site to another?
- RSS Feed Custom Title? (code placing) [duplicate]
- RSS Subscriber count
- images are broken
- WordPress Plugins Feed Error, but I’m not asking for a plugins feed
- WordPress not showing the latest articles in RSS feed
- Editing wp-includes/feed.php
- Set RSS feed update time
- Is fech_feed() use lots of server resourses?
- Remove or truncate site rss in
- How do I get an RSS feed to work
- How to get recent posts from wordpress RSS feed