noindex

Displays a noindex meta tag if required by the blog configuration.

Description

noindex(); 

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 action.

Typical usage is as a callback:


Usage

  1. if ( !function_exists( 'noindex' ) ) { 
  2. require_once ABSPATH . WPINC . '/general-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = noindex(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/general-template.php  
  1. function noindex() { 
  2. // If the blog is not public, tell robots to go away. 
  3. if ( '0' == get_option('blog_public') )