add_action( 'do_robots', 'rlv_block_bots_robots_txt' ); function rlv_block_bots_robots_txt() { ?> User-agent: * Disallow: /search/ Disallow: /?s=