title: Noindex Buddypress pages - X-Robots tag
body: <p>I'm trying de-index all the Buddypress pages like Photos, Groups, Profiles, Activity etc.</p>
  
  <p>I was hoping to use something like the following function that adds an X-Robots tag into each page head.</p>
  
  <pre><code>function noindex_buddypress_pages() {
      if ( is_buddyPress() || bp_is_groups() ) {
          echo '&lt;meta name="robots" content="noindex, nofollow"&gt;';
      }
  }
  add_action( 'wp_head', 'noindex_buddypress_pages' );
  </code></pre>
  
  <p>Will this work or is there a better solution to do this?</p>