In the past, I used to make lot of changes in the core files of WordPress. One of the changes I used to make was in the defaultfilters.php file. I used to edit this file to remove some of the elements from showing up in the head section of my site/blog.
But this editing of core files created problem for me whenever I had to update wordpress. The problem increased when WordPress introduced the automatic updating feature.
This is when I realized that I need to find a better solution for stopping some of the elements from showing up in the head section.
Soon I found that one can add some commands in functions.php file of the currently used theme. This will do the job for us plus, in updates, no changes are made to this file.
Here are few articles where you can find the code that you need to enter in the functions.php file:
WordPress: How to remove the Index, Start, Next, Prev Link Elements
WordPress: How to remove the Shortlink Link Element
WordPress: How to remove the wlwmanifest and EditURI/RSD Link Element
WordPress: Cannot get rid of All <link rel=”alternate” type=”application/rss+xml” Tags
Note: if you make any changes in WordPress core files, then after you update your blog, those changes may get reverted and you will have to edit the files again and again. So the better solution is to use the functions.php file.
- WordPress Plugin: Send an Email Notification ONLY IF Someone Replies to My Comment
- How to Remove CleverPlugins Advertisement/News from WordPress Dashboard
- WordPress: Cannot get rid of All
- WordPress: How to remove the Index, Start, Next, Prev Link Elements
- WordPress: How to remove the Shortlink Link Element
