remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'feed_links_extra\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 3 ); //去除评论feed
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'feed_links\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 2 ); //去除文章feed
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'rsd_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ); //针对Blog的远程离线编辑器接口
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wlwmanifest_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ); //Windows Live Writer接口
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'index_rel_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ); //移除当前页面的索引
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'parent_post_rel_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 10, 0 ); //移除后面文章的url
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'start_post_rel_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 10, 0 ); //移除最开始文章的url
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_shortlink_wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 10, 0 );//自动生成的短链接
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'adjacent_posts_rel_link\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', 10, 0 ); ///移除相邻文章的url
remove_action( \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'wp_generator\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ); // 移除版本号

根据上面的提示注释,我们可以把脚本添加到FUNCTION.PHP(当前主题下)文件中,这样我们网站源代码中就移除掉没有必要的代码行,进而提高代码执行率和网站速度。

相关新闻

发表评论

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

联系我们

联系我们

151-1101-0018

在线咨询:< a href="https://wpa.qq.com/msgrd?uin=30115776" target="_blank" rel="noopener noreferrer">点击这里给我发消息</ a>

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
关注微信
分享本页
返回顶部