问题
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:
- How do I stop Wordpress from inserting a noindex meta tag?
- Wordpress remove Robots Meta Tag noindex
- 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