# Add an Attribution Line to Feed Items

> Appends "The post ... first appeared on ..." with links to every feed item, which credits you when content is scraped from your feed.

- Type: PHP
- Runs: Run everywhere
- Category: [RSS Feeds](https://wpide.com/library/category/rss/)
- Tags: rss, feeds, attribution, scraping
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/rss-footer-attribution/

## Code

```php
$wpide_feed_footer = function ( $content ) {
    return $content . sprintf(
        '<p>The post <a href="%1$s">%2$s</a> first appeared on <a href="%3$s">%4$s</a>.</p>',
        esc_url( get_permalink() ),
        esc_html( get_the_title() ),
        esc_url( home_url( '/' ) ),
        esc_html( get_bloginfo( 'name' ) )
    );
};

add_filter( 'the_content_feed', $wpide_feed_footer );
add_filter( 'the_excerpt_rss', $wpide_feed_footer );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add an Attribution Line to Feed Items" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
