0

我试图让我的网站被搜索引擎索引。据此,来自 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();
    ?>
4

2 回答 2

0

我在这里找到了一个对我有用的解决方案: 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' );
}

这个问题似乎在三个线程上:

  1. 如何阻止 Wordpress 插入 noindex 元标记?
  2. Wordpress 删除机器人元标记 noindex
  3. 无法删除 wordpress 中的操作 noindex
于 2019-11-05T16:20:24.367 回答
0

请访问Settings » Reading并确保您没有选中“劝阻机器人”设置附近的复选框。

于 2018-06-27T14:16:29.947 回答