Title: Removing feeds from header using a function?
Last modified: August 20, 2016

---

# Removing feeds from header using a function?

 *  [casper1](https://wordpress.org/support/users/casper1/)
 * (@casper1)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/removing-feeds-from-header-using-a-function/)
 * I want to remove the default RSS feed, which I can successfully do by adding 
   this in functions.php file.
 * `remove_action( 'wp_head', 'feed_links', 2 );`
    However, It is important for 
   me to use this in a function instead of using directly. For that purpose, I’m
   trying following:
 *     ```
       function remove_rss() {
           remove_action( 'wp_head', 'feed_links', 2 );
       }
       add_action('wp_head', 'remove_rss');
       ```
   
 * but that does not work. I think the reason is the wp_head loads after the feeds
   are loaded in the header. How can I make it load before the header adds the feeds?
   Thanks.

The topic ‘Removing feeds from header using a function?’ is closed to new replies.

## Tags

 * [Feeds](https://wordpress.org/support/topic-tag/feeds/)
 * [RSS](https://wordpress.org/support/topic-tag/rss/)
 * [wp_head](https://wordpress.org/support/topic-tag/wp_head/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [casper1](https://wordpress.org/support/users/casper1/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/removing-feeds-from-header-using-a-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
