noindex

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

<noindex> tag for Google

淺唱寂寞╮ 提交于 2019-11-29 11:12:47
问题 I would like to tell Google not to index certain parts of the page. In Yandex (russian SE) there's a very useful tag called <noindex> . How can it be done with Google? 回答1: You can prevent Google from seeing portions of the page by putting those portions in iframes that are blocked by robots.txt. robots.txt Disallow: /iframes/ index.html This text is crawlable, but now you'll see text that search engines can't see: <iframe src="/iframes/hidden.html" width="100%" height=300 scrolling=no>

How to no index specific URLS?

妖精的绣舞 提交于 2019-11-27 08:23:20
问题 I was searching around on how to no index specific URLs but I havent found any specific info on the following. By adding the below <?php if(is_single(X)): ?> <meta name="robots" content="noindex,nofollow"> <?php endif; ?> I would be able to no index the (X) where X could be the post ID, the post title of “Hello World” for example , or a post slug of “hello-world”. Would if be possible to specify all URLs which start with the same post slug or title for example, as in the example below? www