ok thaks for the advice. i’ll update it in a child theme.
anyway, i used the following snippet and set up profile forms related to specific roles. i also used the visibility option available from the “settings-> appearance-> profile menu” so that the tabs are visible only to specific user roles.
anyway, the following is my user role setup:
1) type A – who can edit their own profile and browse other type A users.
2) type B – who can edit their own profile and browse other type A users, but not type B.
here’s the snippet. looking forward to a :
/* Family, History & Contact Tab to be editable only by the Type A role and viewed in Member Directory */
function um_Family_add_tab( $tabs ) {
$tabs['Family'] = array(
'name' => 'Family, History & Contact',
'icon' => 'um-icon-android-people',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Family_add_tab', 1000 );
// Action
function um_profile_content_Family_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="940"]' );
}
add_action( 'um_profile_content_Family_default', 'um_profile_content_Family_default' );
/* Farming Practices & Processing - to be edited only by the Type A role and viewed in Member Directory */
function um_Farming_add_tab( $tabs ) {
$tabs['Farming'] = array(
'name' => 'Farming Practices & Processing',
'icon' => 'um-faicon-tags',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Farming_add_tab', 1000 );
// Action
function um_profile_content_Farming_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="941"]' );
}
add_action( 'um_profile_content_Farming_default', 'um_profile_content_Farming_default' );
/* Place, Harvest, Production & Merits to be edited only by Type A users and viewed in Member Directory */
function um_Place_add_tab( $tabs ) {
$tabs['Place'] = array(
'name' => 'Place, Harvest, Production & Merits',
'icon' => 'um-icon-android-globe',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Place_add_tab', 1000 );
// Action
function um_profile_content_Place_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="942"]' );
}
add_action( 'um_profile_content_Place_default', 'um_profile_content_Place_default' );
/* Coffee Lot Info to be edited only by Type A users and viewed in Member Directory */
function um_Coffee_add_tab( $tabs ) {
$tabs['Coffee'] = array(
'name' => 'Coffee Lot Info',
'icon' => 'um-icon-coffee',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Coffee_add_tab', 1000 );
// Action
function um_profile_content_Coffee_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="953"]' );
}
add_action( 'um_profile_content_Coffee_default', 'um_profile_content_Coffee_default' );
/* Roaster Profile - to be edited and viewed only by logged in Type B user */
function um_Roaster_add_tab( $tabs ) {
$tabs['Roaster'] = array(
'name' => 'Roaster Profile',
'icon' => 'um-faicon-building',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Roaster_add_tab', 1000 );
// Action
function um_profile_content_Roaster_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="1999"]' );
}
add_action( 'um_profile_content_Roaster_default', 'um_profile_content_Roaster_default' );
/* Roaster Production, Planning & Buying Strategy - to be edited and viewed only by logged in Type B user */
function um_Buying_add_tab( $tabs ) {
$tabs['Buying'] = array(
'name' => 'Production, Planning & Buying Strategy',
'icon' => 'um-faicon-tags',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_Buying_add_tab', 1000 );
// Action
function um_profile_content_Buying_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="2017"]' );
}
add_action( 'um_profile_content_Buying_default', 'um_profile_content_Buying_default' );
/* About You - to be edited and viewed only by logged in Type B user */
function um_About_add_tab( $tabs ) {
$tabs['About'] = array(
'name' => 'About You',
'icon' => 'um-icon-android-person',
);
return $tabs;
}
add_filter( 'um_profile_tabs', 'um_About_add_tab', 1000 );
// Action
function um_profile_content_About_default( $args ) {
echo do_shortcode( '[ultimatemember form_id="2026"]' );
}
add_action( 'um_profile_content_About_default', 'um_profile_content_About_default' );
please do let me know if you need anything else. and i really appreciate your help in this regard. thanks a ton.