Skip to content

Instantly share code, notes, and snippets.

@dimensionmedia
Created October 14, 2016 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimensionmedia/c49347c8e24f00f43450b37506b4e009 to your computer and use it in GitHub Desktop.
Save dimensionmedia/c49347c8e24f00f43450b37506b4e009 to your computer and use it in GitHub Desktop.
<?php
function kadii_register_member_types_with_directory() {
bp_register_member_type( 'golfer', array(
'labels' => array(
'name' => 'Golfer',
'singular_name' => 'Golfer',
),
'has_directory' => 'golfers'
) );
bp_register_member_type( 'golf_professional', array(
'labels' => array(
'name' => 'Golf Professional',
'singular_name' => 'Golf Professional',
),
'has_directory' => 'golf-professionals'
) );
}
add_action( 'bp_register_member_types', 'kadii_register_member_types_with_directory' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment