Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Link back to your site in the RSS feed

Adds “The post … first appeared on …” with links to the end of every post in your feed. Scraper sites that copy your feed then link back to you.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category RSS feeds
  • Tested with WordPress 7.1
PHP
<?php

$snipfire_feed_footer = static function ( $content ) {
	if ( ! is_feed() ) {
		return $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', $snipfire_feed_footer );
add_filter( 'the_excerpt_rss', $snipfire_feed_footer );

In these packs

  • RSS feeds: Control what your RSS feed shows, and when.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.