title: buddypress hide profile fields
body: <p>I know there is a method in BuddyPress which can help to hide some profile fields:</p>
  
  <pre><code>function bp_has_profile( $args = '' ) {
      global $profile_template;
  
      // Only show empty fields if we're on the Dashboard, or we're on a user's profile edit page,
      // or this is a registration page
      $hide_empty_fields_default = ( !is_network_admin() &amp;&amp; !is_admin() &amp;&amp; !bp_is_user_profile_edit() &amp;&amp; !bp_is_register_page() );
  
      // We only need to fetch visibility levels when viewing your own profile
      if ( bp_is_my_profile() || bp_current_user_can( 'bp_moderate' ) || bp_is_register_page() ) {
          $fetch_visibility_level_default = true;
      } else {
          $fetch_visibility_level_default = false;
      }
  
      $defaults = array(
          'user_id'             =&gt; bp_displayed_user_id(),
          'profile_group_id'    =&gt; false,
          'hide_empty_groups'   =&gt; true,
          'hide_empty_fields'   =&gt; $hide_empty_fields_default,
          'fetch_fields'        =&gt; true,
          'fetch_field_data'    =&gt; true,
          'fetch_visibility_level' =&gt; $fetch_visibility_level_default,
          'exclude_groups'      =&gt; false, // Comma-separated list of profile field group IDs to exclude
          'exclude_fields'      =&gt; false  // Comma-separated list of profile field IDs to exclude
      );
  
      $r = wp_parse_args( $args, $defaults );
      extract( $r, EXTR_SKIP );
  
      $profile_template = new BP_XProfile_Data_Template( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields, $hide_empty_fields, $fetch_visibility_level );
      return apply_filters( 'bp_has_profile', $profile_template-&gt;has_groups(), $profile_template );
  }
  </code></pre>
  
  <p>I am not sure how to call this method and pass 'exclude_fields' => $IDs_to_hide</p>