Remove WordPress Post Feed and Post Comment Feed

Advertisement

Here is How to Remove WordPress Post Feed and Post Comment Feed Via Snippet and Plugins With the Explanation of All Types of Feeds Generated. These tweaks are for optimizing the crawling by the search engine bots. More you will customize and simplify your WordPress powered website’s HTML output, more easily Google can Crawl. WordPress has very limited number of useful plugins. Most are useless, sometimes harmful. None ever tests all the 22 thousand or some number of plugins officially available, snippets are for the advanced users, Plugins are for the new users. These are one of the reasons of getting 404 Errors against a WordPress website on Google Webmasters Tools apart from the reasons we wrote before. 404 for the non existing URLs must not be redirected internally. Rather the reason should be removed.

Normally the advanced users use Genesis (GNU GPL Theme Framework with Premium Support) or Woo (same like Genesis) or Thesis (same like Genesis) the default WordPress Theme. Genesis has an advantage – buy once and forget. We purchased one License long back, that framework is running on all the domains. Woo is also good and has some free themes. We can not say about the other badly coded Themes. Genesis and WordPress Default WordPress theme has common developers. Function of WordPress is not altered – other Themes can act peculiarly. If our fix does not work; essentially it is for the Theme. We have no support for any paid theme. Do not download themes from questionable sources.

Yoast WordPress SEO removes some, not all the RSS feeds. Somehow the intended function does not work properly at least on Nginx PHP5-FPM setup with MySQL powered by InnoDB Engine. Yoast does not use Class I servers (Rackspace, HP Cloud etc.) nor is used with Platform as a Service (PaaS) like Heroku or OpenShift. It is abnormal to think that Yoast is using HHVM with RabbitMQ. Do it yourself.

Post can have all kind of junks. Google bots try to find the provided URIs.

This is the thing which can change your life :

Vim

1

./wp-includes/default-filters.php

If you check WordPress Settings > Reading Settings you’ll understand you can not control the comment feeds. To remove the version thing both from WordPress Post’s HTML source and Feed, you can add this snippet to your Theme/Child Theme’s function.php or wp-config.php. Yeah, adding things to wp-config.php should work but basically it is better not to make the file heavy :

Vim

1

2

3

4

add_filter('the_generator','donkey_complete_version_removal');

functiondonkey_complete_version_removal(){

return'';

}

donkey is just a name. I could use thecustomizewindows. Adding this will remove all the comments and other feed links :

Vim

1

2

remove_action('wp_head','feed_links_extra',3);

remove_action('wp_head','feed_links',2);

Here are all the snippets with description of what they does :

Vim

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

//Removes the links to the extra feeds,i.e.category feeds

remove_action('wp_head','feed_links_extra',3);

//Removes links to the Post and Comment Feed

remove_action('wp_head','feed_links',2);

//Removes the link to the Really Simple Discovery service endpoint

remove_action('wp_head','rsd_link');

//Removes the link to the Windows Live Writer

remove_action('wp_head','wlwmanifest_link');

//Removes the index link

remove_action('wp_head','index_rel_link');

//Removes the prev link

remove_action('wp_head','parent_post_rel_link');

//Removes the start link

remove_action('wp_head','start_post_rel_link');

//Removes the relational links

remove_action('wp_head','adjacent_posts_rel_link');

//Removes the WordPress version number

remove_action('wp_head','wp_generator');

Remove WordPress Post Feed and Post Comment Feed : Plugins

So far, we have discovered these Plugins to useful :

Vim

1

2

3

https://wordpress.org/plugins/adminimize/

https://wordpress.org/plugins/fp-rss-category-excluder/

https://wordpress.org/plugins/osd-remove-all-wp-creds/

Yoast WordPress SEO removes some but not all the stuffs. Basically WordPress needs to be covered to Python or Ruby like Language with a better Database Software. PHP is an inferior language, one simple comments field can help the hacker to run SQL injection. WordPress, for the many has been a kind of Open Source vendor locked software. It is basically impossible to suddenly convert a website with 5K posts to Octopress or any Python based WordPress like web software.