Add robots meta tag to specific page

This method is for the Genesis framework, applied in the functions.php file

// Add Robots Meta
add_action( 'genesis_meta', 'raz_robots_meta_tag' );
function raz_robots_meta_tag() {
   if ( is_page('page title')) {  
       echo '<meta name="robots" content="noindex,nofollow">';
   }
}

 

Similar Posts