admin管理员组文章数量:1122846
Bit of a strange one. One of my clients site is showing
<meta name='robots' content='noindex,follow' />
in the head. The Search Engine Visibility checkbox is unchecked.
I've tried activating 2019 theme and deactivating all plugins and still the tag shows.
Never encountered this before. Any ideas?
Bit of a strange one. One of my clients site is showing
<meta name='robots' content='noindex,follow' />
in the head. The Search Engine Visibility checkbox is unchecked.
I've tried activating 2019 theme and deactivating all plugins and still the tag shows.
Never encountered this before. Any ideas?
Share Improve this question asked Apr 9, 2019 at 19:09 Luke SeallLuke Seall 3303 silver badges17 bronze badges 2- 1 In wordpress.stackexchange.com/q/333807/30597 someone had the same problem. Turned out former dev hacked core header template. – leymannx Commented Apr 9, 2019 at 19:12
- I replaced all the core files with fresh updated version. Didn't fix it. – Luke Seall Commented Apr 9, 2019 at 19:23
2 Answers
Reset to default 0Check to make sure the blog_public
option in the options table is set to 1
. If that looks right, make sure nothing is adding that tag via the wp_head
action. Also make sure this isn't being set by any plugins. This is common for SEO plugins.
To switch from noindex to index from inside a template:
<?php
global $wp_filter;
foreach($wp_filter['wpseo_robots_array']->callbacks[10] as $k => $v){
$robots = $v['function'];
}
remove_filter( 'wpseo_robots_array', $robots );
?>
see: https://github.com/Yoast/wordpress-seo/blob/f6719d2e5d6eb173ab6a9ca63093b422582d66be/src/integrations/front-end/indexing-controls.php#L53
Or, much easier:
update_option('blog_public', 1);
本文标签: Can39t remove noindex meta tag from head
版权声明:本文标题:Can't remove noindex meta tag from head 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736287515a1927895.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论