easily promote RSS feed in wordpress

How to easily promote RSS feed through every post

If you have wordpress site and easily promote RSS feed in wordpress then you can use our simple code to add in functions.php file. RSS feed are important for every website.

easily promote RSS feed in wordpress

Open your functions.php file. you can find this file in your currently activated wordpress theme folder. just put following code in that file.


function wpapi_promote_feed($content,$class = "promote") {
echo $content; if (is_single()) {
?>
<div class="<?php echo $class; ?>">
<h3>Enjoyed this article?</h3> <p>Please consider subscribing to our
<a class="feed" href="<?php bloginfo('rss2_url'); ?>" title="Subscribe via RSS">RSS feed!</a>
</p> </div>
<?php } }

add_filter('the_content','wpapi_promote_feed');

Here I used “the_content” filter, which will add simple RSS subscriber link at bottom of your content. If you want to add custom image or CSS for link then you need to modify this code littlebit.

easily promote RSS feed in wordpress
easily promote RSS feed in wordpress

 

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.