Jump to content
Sign in to follow this  
thrippets

Remove RSS Feeds

Recommended Posts

thrippets

Hi all, Can anyone help me remove the RSS feeds from the header section please? I found the following code: function fb_disable_feed() { wp_die( __('No feed available,please visit our homepage!') ); } add_action('do_feed', 'fb_disable_feed', 1); add_action('do_feed_rdf', 'fb_disable_feed', 1); add_action('do_feed_rss', 'fb_disable_feed', 1); add_action('do_feed_rss2', 'fb_disable_feed', 1); add_action('do_feed_atom', 'fb_disable_feed', 1); It says put it at the end of the functions.php file which I did in the Base theme, but it hasn't worked. Any ideas? Thanks.

Share this post


Link to post
Share on other sites
Kate

Hi thrippets, A little easier: Settings->Header and Nav->News/Blog RSS Icon ... Uncheck "Display the Blog RSS and icon and link" ;) That way you can still have the feed functionality on your site for readers, etc...

Share this post


Link to post
Share on other sites
thrippets

Hi Kate, Thanks for the reply. I meant HTML header section. I've already removed the icon using the settings. I'm using Wordpress as a CMS as opposed to blogging software, so don't have any posts, and therefore the RSS feeds don't work. I wanted to remove the links from the source code. I've just found out that the code above did work by being inserted into functions.php, it's just that the feed says "No feed available,please visit our homepage". That's not what I was after... Any other ideas?

Share this post


Link to post
Share on other sites
thrippets

OK I managed to sort it out myself. I added the following code to the end of functions.php in Base: remove_action( 'wp_head', 'feed_links_extra', 3 ); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'rsd_link'); remove_action( 'wp_head', 'feed_links', 2 );

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×