2

I am a newbie at WordPress and wanted to know if their is a way to remove RSS notifications from the theme I am using. I tried looking for a functions.php file but have not had any luck. I am using the Opulus Sombre theme.

1 Answer 1

3

I never used the theme "Opulus Sombre". But the feed link on the <head> section typically comes from the functions.php. There is a line saying1:

add_theme_support( 'automatic-feed-links'  );

Otherwise it can be hard-coded to your header.php like2:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

1. Codex: Automatic Feed Links
2. WordPress 3.0 Theme Tip Feed Links — ottopress.com

EDIT

Thanks to Chip Bennett for the actual answer, just putting that into the answer with full respect to him:
Just use the following code into your functions.php to remove feed link:

add_action( 'after_theme_support', 'wpse_122841_remove_feed' );

function wpse_122841_remove_feed() {
   remove_theme_support( 'automatic-feed-links' );
}

Thanks to Chip Bennett for the addition. Thanks birgire and Vincent for suggesting the fixes.

3
  • 1
    +1. Use remove_theme_support( 'automatic-feed-links' ), in a callback hooked into after_theme_support, to remove. Commented Nov 11, 2013 at 2:07
  • 1
    You're missing a semicolon at the end of remove_theme_support( 'automatic-feed-links' ). Commented Feb 11, 2017 at 16:16
  • 1
    I would also suggest prefixing the function name to avoid possible name collision.
    – birgire
    Commented Feb 11, 2017 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.