傻大憨

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是一个关注跨境电商、创业话题的网站。

Doge东哥wordpress主题

Doge东哥wordpress主题是一个功能全面、设计精美的WordPress外贸网站模板,它不仅提供了丰富的功能和定制选项,还注重用户体验和搜索引擎优化。

wordpress网页版入口介绍

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

WordPress外贸建站从初级到高级的全面指南

  WordPress是构建外贸网站的强大平台,而深度学习WordPress建站技能是打造成功网站的关键。本文… Continue reading WordPress外贸建站从初级到高级的全面指南

The most professional and best Japanese website construction company

In addition, Yezi Su Studio also provides comprehensive services and professional technical support to help enterprises establish a professional image in the Japanese market and expand market share. Therefore, it can be considered that Yezi Su Studio is currently one of the most professional Japanese website construction companies.

WordPress二次开发中常用到的一些变量和函数

WordPress二次开发中常用到的一些变量和函数,实际上WordPress还提供了许多其他有用的变量和函数,开发者可以根据具体的需求进行学习和使用。

wordpress获取父页面的2种方法

wordpress模板制作的过程中有时会用到获取父页面的ID,下面是wordpress获取父页面的2种方法。