noindex [ WordPress Functions ]
| See: | |
| Defined at: |
|
| Codex |
Display a noindex meta tag if required by the blog configuration.
If a blog is marked as not being public then the noindex meta tag will be output to tell web robots not to index the page content. Add this to the wp_head action. Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' );
Source
function noindex() {
$public = get_option( 'blog_public' );
if ( is_multisite() ) {
// Compare local and global and override with the local setting if they
// don't match.
global $current_blog;
if ( ( '' != $public ) && ( $public != $current_blog->public ) ) {
update_blog_status( get_current_blog_id(), 'public', $public );
$current_blog->public = $public;
}
}
// If the blog is not public, tell robots to go away.
if ( '0' == $public )
wp_no_robots();
}Examples [ wp-snippets.com ]
Top Google Search Results
- noindex - Wikipedia, the free encyclopedia
The noindex value of an HTML robots meta tag requests that automated Internet bots avoid indexing a web page. Reasons why one might want to use this meta ...
en.wikipedia.org - <META> tag - The Web Robots Pages
Aug 23, 2010 ... title> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> </head>. There are two important considerations when using the robots ...
www.robotstxt.org - Using meta tags to block access to your site - Webmaster Tools Help
Jan 6, 2012 ... To entirely prevent a page's contents from being listed in the Google web index even if other sites link to it, use a noindex meta tag. As long as ...
support.google.com - What should NOINDEX do? - Matt Cutts
Feb 24, 2008 ... Okay, this post will be colossally boring to some people. But I wanted to give you a peek at debates behind the curtain in Google's search ...
www.mattcutts.com
User discussions [ wordpress.org ]
- MechaGnome on "Meta robots not updating"
- ioushirts on "Meta robots not updating"
- ecx on "[Plugin: WordPress SEO by Yoast] Noindex subpages of archives won't undo"
- Allen on "[Plugin: WP RSS Multi Importer] Noindex feature request"
- Dermod on "[Plugin: WP RSS Multi Importer] Noindex feature request"
- Allen on "[Plugin: WP RSS Multi Importer] Noindex feature request"
- Dermod on "[Plugin: WP RSS Multi Importer] Noindex feature request"
- Sayontan Sinha on "[Theme: Suffusion] want to remove the noindex/nofollow code"
- fatosh on "[Theme: Suffusion] want to remove the noindex/nofollow code"
- Krishna on "How to add "noindex" to a link..."
