wp_no_robots

Display a noindex meta tag.

Description

wp_no_robots(); 

Outputs a noindex meta tag that tells web robots not to index the page content. Typical usage is as a wp_head callback. add_action( wp_head,, wp_no_robots );


Usage

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

Defined (1)

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

/wp-includes/general-template.php  
  1. function wp_no_robots() { 
  2. echo "<meta name='robots' content='noindex, follow' />\n";