如何阻止Wordpress插入noindex元标签? [英] How do I stop Wordpress from inserting a noindex meta tag?
本文介绍了如何阻止Wordpress插入noindex元标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试让我的网站被搜索引擎编入索引。根据这一点,Wordpress的一些东西注入了一个元标签,阻止搜索引擎爬行我的网站:https://aw-snap.info/file-viewer/?protocol=secure&tgt=chrispokey.com
我开始认为这与wp_head();
函数有关。我可以采取哪些后续步骤来删除以某种方式插入到我的网站标题部分的noindex标记?
谢谢!
<?php
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
wp_head();
?>
推荐答案
🥳我在这里找到了一个适合我的解决方案:👉https://wordpress.org/support/topic/disable-noindex-on-certain-core-pages-2/
add_action( 'init', 'remove_wc_page_noindex' );
function remove_wc_page_noindex(){
remove_action( 'wp_head', 'wc_page_noindex' );
}
此问题似乎在三个主题上:
- How do I stop Wordpress from inserting a noindex meta tag?
- Wordpress remove Robots Meta Tag noindex
- Cannot remove action noindex in wordpress
这篇关于如何阻止Wordpress插入noindex元标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文