一、主题function添加以下代码

//去除head一些连接

remove_action(‘wp_head’, ‘rsd_link’); //removes EditURI/RSD (Really Simple Discovery) link.
remove_action(‘wp_head’, ‘wlwmanifest_link’); //removes wlwmanifest (Windows Live Writer) link.
remove_action(‘wp_head’, ‘wp_generator’); //removes meta name generator.
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’); //removes shortlink.
remove_action( ‘wp_head’, ‘feed_links’, 2 ); //removes feed links.
remove_action(‘wp_head’, ‘feed_links_extra’, 3 );  //removes comments feed.
/*Removes prev and next links*/

remove_action(‘wp_head’, ‘adjacent_posts_rel_link_wp_head’);

二、head删除 XFN (XHTML Friends Network) Profile 链接 和 Pingback URL

<link rel=”profile” href=”http://gmpg.org/xfn/11″>

<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>”>

发表评论

电子邮件地址不会被公开。 必填项已用*标注