How to delete/remove wordpress feed
urls from the head
tag in header.php
?
Example these URLs:
<link rel="alternate" type="application/rss+xml" title="Example Business » Feed" href="http://example.com/feed/"/>
<link rel="alternate" type="application/rss+xml" title="Example Business » Comments Feed" href="http://example.com/comments/feed/"/>
<link rel="alternate" type="application/rss+xml" title="Example Business » Home Page Live Comments Feed" href="http://example.com/home/feed/"/>
I don’t want to use any plugin for the same.
Iâve recently had a need to remove the feed url link elements and in trying to avoid customising the core WordPress functions the following solutions works.
Ensure you have a
functions.php
file in your theme directory that you are using. If not create the file and edit the file. The following lines will help remove select lines from yourwp_head()
function:You can add this code in your WordPress theme/plugin. to remove all the unnecessary tags from head including WordPress feed tags.
Github Gist URL: https://gist.github.com/coder618/29782921f79235f26285847916c2a122
The simplest way, to remove RSS FEED button is more simple, just go in Appearance / Editor / and REMOVE :
from Theme Header (header.php) of your theme, for me Graphene. Others ways don’t work for me, but this way is very simple !!!! Tested!!! PS: Find the same type of script changing graphene, word with the name of your theme.