SOHO创业

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 SOHO

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

外贸独立站建站如何选择一个靠谱的建站服务商

选择建站服务商时,建议多方面进行考察和比较,甚至可以要求试用或原型设计,以确保最终选择的服务商能够满足你的需求并帮助你实现业务目标。

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.

独立站建站需要准备哪些资料?需要多少预算?

独立站建站的总预算通常在600-1000元左右(初期),但具体金额需根据建站规模和功能需求进行调整。

跨境电商独立站如何优化SEO

跨境电商独立站优化SEO是一个复杂且持续的过程,涉及多个方面。以下是一些关键步骤和策略。

wordpress外贸模板建站的优势

WordPress凭借其强大的功能和丰富的插件资源,成为了许多外贸企业的首选。

非插件方式实现owl carousel图片轮播

要实现一个非插件方式的图片播放功能,同时支持后台管理和区块编辑器,你需要考虑几个关键部分:HTML结构、CSS样式和JavaScript逻辑。