How to Show Content Only to RSS Subscribers in WordPress341

How-to-Show-Content-Only-to-RSS-Subscribers-in-WordPress
Author: InfoBeep - December 1, 2017 | subject to copyright

When and why you need feed only content in WordPress?

Sometimes, site owner wants to have more subscribers in your site. As it is difficult for readers to convince to subscribe to your RSS feed. You can use different tactics like ‘Content Upgrade’ to gain subscribers. Also, you can offer bonus content to your subscribers.

Here, we will guide you to offer bonus content only to your RSS subscribers in 2 different methods:

Method 1: Adding feed only content using a plugin

To add Feed only content using a plugin, follow the steps below:

  • Install and activate ‘WP Kill in Feed’ plugin.
  • After activated, the plugin will make 2 new shortcodes (addtofeed and killinfeed) for you to use. See the example below:
[addtofeed]

This content is for RSS feed subscribers only

[/addtofeed]

(note: the content inside the shortcode ‘addtofeed’ is only visible by your subscribers)

[killinfeed]

Content hidden from RSS feed subscribers

[/killinfeed]

(note: the content inside the shortcode ‘killinfeed’ is not visible to your subscribers)

Method 2: Show content only to RSS feed subscribers using code

In this method, you need to add the code given below in your theme’s functions.php file or site-specific plugin:

function feedonly_shortcode( $atts, $content) {

                if (is_feed())

                return apply_filters( 'the_content', $content );

                return "";

}

add_shortcode('feedonly', 'feedonly_shortcode');

Now, you just need to wrap feed only content like the code below. The text, picture or anything inside the code would only be visible by your site subscribers

[feedonly]

This content will only be visible to RSS feed subscribers

[/feedonly]