Cannot remove action noindex in wordpress

北战南征 提交于 2019-12-02 14:03:35

问题


I've done some research and run up with this code

remove_action('wp_head','noindex',1);

but apparently it's not removing the <meta name="robots" content="noindex,follow"/> in my WordPress header. I'm using WordPress 4.2.3


回答1:


🥳 I found a solution that worked for me here: 👉 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' );
}

This question appears to be on three threads:

  1. How do I stop Wordpress from inserting a noindex meta tag?
  2. Wordpress remove Robots Meta Tag noindex
  3. Cannot remove action noindex in wordpress



回答2:


Log in to your WordPress website.

When you're logged in, you will be in your 'Dashboard'.

Click on 'Settings'. On the left-hand side, you will see a menu. ...

Click on 'Reading'. ...

UnCheck 'Discourage search engines from indexing this site'.

Click 'Save Changes'.



来源:https://stackoverflow.com/questions/34195643/cannot-remove-action-noindex-in-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!