1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with RSS

Discussion in 'WordPress' started by desirock, Jan 13, 2012.

  1. #1
    I would like to place a subscribe to RSS link at end of each post in wordpress. Any plugin that can help me do that? I am using headway
     
    desirock, Jan 13, 2012 IP
  2. borgizzle

    borgizzle Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    You don't need to use a plugin for this (and you shouldn't).
    Instead, add this code to your functions.php file (located in wp-content/themes/THEMENAME/functions.php)

    
    function add_rss_after_content($content){
        $rss_html = '<div class="content-rss"><a href="' . get_bloginfo('rss2_url') . '">Subscribe to RSS!</a></div>';
        return $content . $rss_html;
    }
    
    add_filter('the_content', 'add_rss_after_content');
    PHP:
    You need to add the code after <?php and before ?>
    Note: You won't always find ?> in the functions.php-file, and if this is the case, don't worry about it, just add it after <?php as I said above

    I added class="content-rss" to the div containing the link, so you can style it easily with css
     
    Last edited: Jan 13, 2012
    borgizzle, Jan 13, 2012 IP
  3. desirock

    desirock Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the tip.............
     
    desirock, Jan 18, 2012 IP