Return to Snippet

Revision: 87717
at December 8, 2021 22:41 by chrisaiv


Updated URL
https://www.chrisjmendez.com/2014/09/13/wordpress-remove-header-junk-from-default-wordpress-install/

Updated Code
https://www.chrisjmendez.com/2014/09/13/wordpress-remove-header-junk-from-default-wordpress-install/

Updated Description
https://www.chrisjmendez.com/2014/09/13/wordpress-remove-header-junk-from-default-wordpress-install/

Revision: 87716
at December 8, 2021 22:40 by chrisaiv


Updated URL
https://www.chrisjmendez.com/2021/12/08/wordpress-remove-header-junk-from-default-wordpress-install/

Updated Code
https://www.chrisjmendez.com/2021/12/08/wordpress-remove-header-junk-from-default-wordpress-install/

Updated Description
https://www.chrisjmendez.com/2021/12/08/wordpress-remove-header-junk-from-default-wordpress-install/

Revision: 67366
at September 13, 2014 10:45 by chrisaiv


Initial Code
/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE: Remove unnecessary meta-data from your WordPress site
* DESCRIPTION: Over the years, wordpress has placed a lot of junk in their system. 
*/
function remove_header_extra(){
	//Are you editing your WordPress blog using your browser? Then you are not using a blog client
	remove_action('wp_head', 'rsd_link');
	// Windows Live Writer is (it’s another blog editing client
	remove_action('wp_head', 'wlwmanifest_link');
	//This announces that you are running WordPress and what version you are using. 
	remove_action('wp_head', 'wp_generator');
	//URL shortening is sometimes useful, but this automatic ugly url in your header is useless.
	remove_action('wp_head', 'wp_shortlink_wp_head');
	// Display the links to the general feeds: Post and Comment Feed
	remove_action('wp_head', 'feed_links', 2);
	//// Display the links to the extra feeds such as category feeds
	remove_action('wp_head', 'feed_links_extra', 3);
	//Deprecated
	remove_action('wp_head', 'index_rel_link');
	// start link
	remove_action('wp_head', 'start_post_rel_link', 10, 0);
	// prev link
	remove_action('wp_head', 'parent_post_rel_link', 10, 0);
	// Display relational links for the posts adjacent to the current post.
	remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
}
add_action('init', 'remove_header_extra');

Initial URL


Initial Description
Over the years, wordpress has placed a lot of junk in their system.

Initial Title
Wordpress: Remove header junk from default Wordpress install

Initial Tags
wordpress

Initial Language
PHP