You have to use the_content
and the_excerpt_rss
hooks. You can do this like this:
function rss_append_footer($content) {
if(is_feed()) {
$related_posts_html = ... // I assume you already can compute it
$content .= $related_posts_html;
}
return $content;
}
add_filter('the_content', 'rss_append_footer');
add_filter('the_excerpt_rss', 'rss_append_footer');
Related Posts:
- RSS for Pages Instead of Posts?
- Show ‘Read more’ in rss feed
- Addition Text to Post Titles (Custom Post Types) in RSS
- Posts gathered from WPEMatico feeds are being mixed in different languages. Polylang is used for language separation
- Problem with articles feed: XML Parsing Error: XML or text declaration not at start of entity
- How to preserve HTML from posts in RSS feed
- How to get a post content from another wordpress blog/site?
- Create pretty permalink for a post knowing the permalink structure
- Post update RSS notification plugin
- get_the_content_feed with paginated posts
- filter RSS feed in URL
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- date issue with category post retrival
- Cannot retrieve a custom RSS field from posts
- Automatically Import WordPress Blog to Facebook Page [closed]
- Remove password protected posts from default RSS feed
- Creating separate feeds for custom post types
- Image on rss feed on post
- Publish a Silent Post without updating Feed
- How can my plugin display a populated new post window
- How can I create an RSS feed that includes “Private” posts?
- fetching posts and showing on frontpage
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- Every time I try accessing a post it redirects me to the feed
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Get image paths from RSS feeds
- How to get override the WP Admin Syndication feed limit for a custom feed?
- Add News Feed to bespoke website, only to one page on whole site
- Stop WP from creating “Sample Page” and “Hello World!” post
- Count how many posts in category
- Remove or Edit in Feeds
- Custom Single Post By Category
- Post slugs and images cannot have same name?
- Hide password protected posts in admin
- Adding Post Counts to Menu (Nav) Programmatically?
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Show chart in post using data passed as custom field
- Show One Category on Post
- Show post titles only on the homepage
- Creating new page with pre-defined parent page
- Get all Youtube video’s from posts and embed them on a different page
- Send email to user that his post has been rejected
- How can I highlight syntax like it appears on stackoverflow?
- wp_insert_post let users post to without login…broke
- Export posts manually selected by end user (not logged in)
- Add Category name to Post Title (h1)
- Blogroll – Different layout for first post
- How to delete old posts’ edits to save space?
- When trashing a post, also trash related comments
- Loop through all product posts?
- Image Insert into posts and pages not working after 3.2.1 update
- Blog Posts not showing title
- How to add Tags Filter in wordpress admin dashboard
- allow new users to post an article before they sign up [closed]
- Make Post Editor Select Number of Columns To 1 By Default
- Display post category in foreach loop with category link
- Adding the_date inside tags around the_content
- Mixing Tweets with Posts
- How to Link to all posts that have the Standard Post Format
- Problem with permalink routing?
- Making a custom Pagination for multi page blog post
- WordPress is replacing double minus signs in Post Title, how to disable it?
- using is_paged for hiding image on posts
- How to group only VISIBLE posts? [closed]
- Show custom post with custom categories with specific slug
- Do one have to wait after pressing “update” on a post edit page?
- separate the post of a category by subcategory
- Add Input Field in Simple Model Contact Form (smcf) plugin [closed]
- Am getting duplicate data from get_posts()
- How to display the post categories for each post inside the loop with custom format?
- Allow / show post comments in category pages
- Filter post by users creation date
- Function is printing twice – any suggestions?
- Limit front-end submitted posts by role
- Pagination Not Working With Custom Post Type Category
- Recent Post Issue
- how to create a category with wp_insert_post and post_category
- Extracting the permalink from a post instance
- How to add a block to a category page?
- If user has 1 post then dont let him create new one [closed]
- Show all posts from the tags without having to set all of them
- wordpress display posts by terms id or name
- Maximum number of posts per page before affecting performance?
- Display post order ranking within wordpress loop
- Auto populate custom fields by post date
- Custom Taxonomy From Database
- Query post by meta key of another table
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- Trying to display stick or featured post on homepage
- Single post page from static home not working
- RSS Feed Custom Title? (code placing) [duplicate]
- limit posts per page
- WordPress Admin Tables in Post View
- Onclick open posts displayed in slider in a popup [closed]
- Listing category and its posts one by one
- Print out one of 2 post category [closed]
- How to get if category has posts?
- Undefined Function Fatal Error with Shortcode [closed]
- I have a website issue I am trying to resolve
- How to sort posts alphabetically based on a specific parent category