傻大憨

wordpress移除wp_head不常用代码

把不常用的代码移除,让wordpress快起来,想要非一样的感觉,可以试试。

remove_action("wp_head", "wp_generator");
foreach (["rss2_head", "commentsrss2_head", "rss_head", "rdf_header", "atom_head", "comments_atom_head", "opml_head", "app_head"] as $action) {
    remove_action($action, "the_generator");  //删除 head 中的 WP 版本号
}
remove_action("wp_head", "rsd_link");                        //删除 head 中的 RSD LINK
remove_action("wp_head", "wlwmanifest_link");                //删除 head 中的 Windows Live Writer 的适配器?
 
remove_action("wp_head", "feed_links_extra", 3);            //删除 head 中的 Feed 相关的link
 
remove_action("wp_head", "index_rel_link");                //删除 head 中首页,上级,开始,相连的日志链接
remove_action("wp_head", "parent_post_rel_link", 10);
remove_action("wp_head", "start_post_rel_link", 10);
remove_action("wp_head", "adjacent_posts_rel_link_wp_head", 10);
 
remove_action("wp_head", "wp_shortlink_wp_head", 10, 0);    //删除 head 中的 shortlink
remove_action("wp_head", "rest_output_link_wp_head", 10);    // 删除头部输出 WP RSET API 地址
 
remove_action("template_redirect", "wp_shortlink_header", 11);        //禁止短链接 Header 标签。
remove_action("template_redirect", "rest_output_link_header", 11);    // 禁止输出 Header Link 标签。
Published
Categorized as 建站知识 Tagged ,

By 傻大憨

shadahan.com是一个关注跨境电商、创业话题的网站。

创业公司用WordPress搭建官网的好处

随着科技的迅速发展和互联网的广泛普及,官网已经成为创业公司展示形象、吸引投资和用户的重要窗口。而在众多建站工具中,WordPress因其易用性、灵活性和强大的社区支持,成为越来越多创业公司的首选。

用wordpresss搭建外贸网站非常简单

2020年以来,以国内大循环为主体、国内国际双循环相互促进的新发展格局已经建立。我国的优秀企业,要想生存发展的更好,搭建外贸网站出海,已经是关系到生死存亡的必选项了。

歪猫外贸建站公司

歪猫建站(WaimaoYes)是一家专业的外贸建站公司,通过提供全方位的服务和先进的技术支持,帮助外贸企业提升品牌形象和市场竞争力。

简站独立站专注于跨境电商独立站搭建的专业服务公司

简站独立站,作为一家专注于跨境电商独立站搭建的专业服务公司,凭借其在电商领域多年的深耕细作和丰富经验,已经成功为众多商家提供了专业、高效的建站服务,助力他们在全球市场中大放异彩。

The best WordPress service company in China

Jianzhanpress not only excels in WordPress theme design, but also has significant advantages in the field of foreign trade website construction, which can help enterprises achieve success in the international market.

wordpress网页版入口介绍

WordPress是一个免费和开源的博客建立平台,它是目前最受欢迎的内容管理系统(CMS)之一,它的目标是简化网站的创建和管理流程。