Skip to content

MH – Team Listing Page v1.1

‘clinician’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘meta_query’ => [
‘relation’ => ‘OR’,
[ ‘key’ => ‘mh_sort_order’, ‘compare’ => ‘EXISTS’ ],
[ ‘key’ => ‘mh_sort_order’, ‘compare’ => ‘NOT EXISTS’ ],
],
‘orderby’ => [ ‘meta_value_num’ => ‘ASC’, ‘title’ => ‘ASC’ ],
‘meta_key’ => ‘mh_sort_order’,
];
$clinicians = get_posts( $args );

// ── Collect filter vocabulary ───────────────────────────────────────
$all_conditions = get_posts( [ ‘post_type’ => ‘condition’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’ ] );
$all_services = get_posts( [ ‘post_type’ => ‘service’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’ ] );

$modality_labels = [
‘cbt’ => ‘CBT’, ‘act’ => ‘ACT’,
’emdr’ => ‘EMDR’, ‘dbt’ => ‘DBT’,
‘schema’ => ‘Schema Therapy’, ‘mindfulness’ => ‘Mindfulness’,
‘psychodynamic’=> ‘Psychodynamic’, ‘mi’ => ‘Motivational Interviewing’,
‘narrative’ => ‘Narrative’, ‘gottman’ => ‘Gottman’,
‘eft’ => ‘EFT’, ‘positive’ => ‘Positive Psychology’,
‘somatic’ => ‘Somatic’, ‘tfcbt’ => ‘TF-CBT’,
‘ipt’ => ‘IPT’, ‘cft’ => ‘CFT’,
‘neuropsych’ => ‘Neuropsychology’, ‘exposure’ => ‘Exposure / ERP’,
‘play’ => ‘Play Therapy’,
];
$funding_labels = [
‘medicare’ => ‘Medicare’, ‘dva’ => ‘DVA’,
‘sira_nsw’ => ‘SIRA NSW’, ‘ctp’ => ‘CTP’,
‘worksafe_vic’ => ‘WorkSafe VIC’,’eap’ => ‘EAP’,
‘comcare’ => ‘Comcare’, ‘ndis’ => ‘NDIS’,
‘private’ => ‘Private’,
];
$age_labels = [
‘children’ => ‘Children (0–12)’,
‘adolescents’ => ‘Adolescents (13–17)’,
‘adults’ => ‘Adults (18–64)’,
‘older_adults’=> ‘Older Adults (65+)’,
];
$lang_labels = [
‘english’ => ‘English’, ‘arabic’ => ‘Arabic’, ‘turkish’ => ‘Turkish’,
‘mandarin’ => ‘Mandarin’, ‘cantonese’ => ‘Cantonese’, ‘hindi’ => ‘Hindi’,
‘punjabi’ => ‘Punjabi’, ‘urdu’ => ‘Urdu’, ‘greek’ => ‘Greek’,
‘italian’ => ‘Italian’, ‘spanish’ => ‘Spanish’, ‘vietnamese’ => ‘Vietnamese’,
‘korean’ => ‘Korean’, ‘tagalog’ => ‘Filipino/Tagalog’, ‘farsi’ => ‘Farsi’,
];
$gender_labels = [
‘male’ => ‘Male clinician’, ‘female’ => ‘Female clinician’,
‘non_binary’ => ‘Non-binary clinician’,
];
$client_labels = [
‘individuals’ => ‘Individuals’, ‘couples’ => ‘Couples’,
‘families’ => ‘Families’, ‘groups’ => ‘Groups’,
];

// ── Build card data array ───────────────────────────────────────────
$cards = [];
foreach ( $clinicians as $c ) {
$acf = function_exists( ‘get_fields’ ) ? get_fields( $c->ID ) : [];
$acf = $acf ?: [];

// Photo: prefer square headshot, fall back to portrait
$photo_arr = $acf[‘mh_headshot_square’] ?? $acf[‘photo_portrait’] ?? null;
$photo_url = ”;
$photo_alt = $c->post_title;
if ( is_array( $photo_arr ) ) {
$photo_url = $photo_arr[‘sizes’][‘medium_large’] ?? $photo_arr[‘url’] ?? ”;
$photo_alt = $photo_arr[‘alt’] ?: $c->post_title;
} elseif ( is_int( $photo_arr ) && $photo_arr > 0 ) {
$img = wp_get_attachment_image_src( $photo_arr, ‘medium_large’ );
$photo_url = $img ? $img[0] : ”;
}
if ( ! $photo_url ) {
// Placeholder SVG
$photo_url = “data:image/svg+xml,%3Csvg xmlns=’http://www.w3.org/2000/svg’ width=’400′ height=’400’%3E%3Crect fill=’%23e8f0e7’/%3E%3Ccircle cx=’200′ cy=’155′ r=’70’ fill=’%23a8c4a6’/%3E%3Cellipse cx=’200′ cy=’340′ rx=’100′ ry=’80’ fill=’%23a8c4a6’/%3E%3C/svg%3E”;
}

// Conditions: IDs → post titles + URLs
$cond_ids = $acf[‘mh_treats_conditions’] ?? [];
$conditions_data = [];
foreach ( (array) $cond_ids as $cid ) {
if ( is_object( $cid ) ) { $cid = $cid->ID; }
$cond_title = get_the_title( $cid );
$cond_url = get_permalink( $cid );
if ( $cond_title ) {
$conditions_data[] = [ ‘id’ => $cid, ‘title’ => $cond_title, ‘url’ => $cond_url ];
}
}

// Modalities
$modalities = (array) ( $acf[‘mh_modalities’] ?? [] );
$modalities = array_filter( $modalities );

// Funding
$funding = (array) ( $acf[‘mh_funding_schemes’] ?? [] );
$funding = array_filter( $funding );

// Languages
$languages_raw = $acf[‘mh_languages’] ?? $acf[‘languages_spoken’] ?? ”;
$languages_arr = is_array( $languages_raw )
? array_filter( $languages_raw )
: array_filter( array_map( ‘trim’, explode( ‘,’, (string) $languages_raw ) ) );

// Age groups, client types, gender
$age_groups = array_filter( (array) ( $acf[‘mh_age_groups’] ?? [] ) );
$client_types = array_filter( (array) ( $acf[‘mh_client_types’] ?? [] ) );
$gender_key = $acf[‘mh_gender’] ?? ”;
$modes = array_filter( (array) ( $acf[‘modes’] ?? [] ) );

// Availability
$next_avail = $acf[‘mh_next_availability_date’] ?? ”;
$taking_new = (bool) ( $acf[‘taking_new_clients’] ?? $acf[‘mh_accepting_new_patients’] ?? true );
$avail_label = ”;
if ( ! $taking_new ) {
$avail_label = ‘Waitlist only’;
} elseif ( $next_avail ) {
$d = strtotime( $next_avail );
$diff = $d – time();
if ( $diff < 86400 * 7 ) $avail_label = 'Available this week'; elseif ( $diff < 86400 * 14 ) $avail_label = 'Available soon'; else $avail_label = 'Available ' . date( 'j M', $d ); } else { $avail_label = 'Accepting clients'; } // Data attributes for JS filtering (space-separated slug lists) $filter_conditions = implode( ' ', array_column( $conditions_data, 'id' ) ); $filter_modalities = implode( ' ', $modalities ); $filter_funding = implode( ' ', $funding ); $filter_languages = implode( ' ', $languages_arr ); $filter_age = implode( ' ', $age_groups ); $filter_clients = implode( ' ', $client_types ); $filter_gender = $gender_key; $filter_modes = implode( ' ', $modes ); $cards[] = [ 'id' => $c->ID,
‘name’ => $c->post_title,
‘url’ => get_permalink( $c->ID ),
‘role’ => $acf[‘role’] ?? ”,
‘tagline’ => $acf[‘mh_profile_tagline’] ?? ”,
‘short_bio’ => $acf[‘short_bio’] ?? ”,
‘post_nominals’ => $acf[‘mh_post_nominals’] ?? ”,
‘years_exp’ => intval( $acf[‘mh_years_experience’] ?? 0 ),
‘photo_url’ => $photo_url,
‘photo_alt’ => $photo_alt,
‘conditions_data’ => $conditions_data,
‘modalities’ => $modalities,
‘funding’ => $funding,
‘languages_arr’ => $languages_arr,
‘age_groups’ => $age_groups,
‘client_types’ => $client_types,
‘gender_key’ => $gender_key,
‘modes’ => $modes,
‘avail_label’ => $avail_label,
‘taking_new’ => $taking_new,
// filter attr strings
‘f_conditions’ => $filter_conditions,
‘f_modalities’ => $filter_modalities,
‘f_funding’ => $filter_funding,
‘f_languages’ => $filter_languages,
‘f_age’ => $filter_age,
‘f_clients’ => $filter_clients,
‘f_gender’ => $filter_gender,
‘f_modes’ => $filter_modes,
];
}

// ── Helper: build a filter pill group ──────────────────────────────
$pill_group = function( $id, $label, $options, $multi = true ) {
$type = $multi ? ‘checkbox’ : ‘radio’;
$html = ‘

‘;
$html .= ‘

‘ . esc_html( $label ) . ‘
‘;
foreach ( $options as $val => $lbl ) {
$uid = ‘mhf_’ . $id . ‘_’ . sanitize_html_class( $val );
$html .= ‘‘;
}
$html .= ‘

‘;
return $html;
};

// ── Build condition options for filter ──────────────────────────────
$cond_opts = [];
foreach ( $all_conditions as $c2 ) {
$cond_opts[ $c2->ID ] = $c2->post_title;
}
asort( $cond_opts );

// ── Render ──────────────────────────────────────────────────────────
?>

Meet Our Team

Experienced psychologists and counsellors, here to help you thrive. Use the filters below to find your best fit.



‘In-Person’, ‘telehealth’ => ‘Telehealth’ ] );
echo $pill_group( ‘funding’, ‘Funding Scheme’, $funding_labels );
echo $pill_group( ‘age’, ‘Age Group’, $age_labels );
?>

clinicians



” class=”mh-card__inner” tabindex=”0″ aria-label=”View profile of “>

“>

🏢
💻








4 ) : ?>
+ more

1 ) :
$lang_display = array_map( function( $k ) use ( $lang_labels ) {
return $lang_labels[ $k ] ?? ucfirst( $k );
}, array_slice( $card[‘languages_arr’], 0, 3 ) );
?>





0 ) : ?>


+ years

View Profile





Related posts