Hide profile description regular user

Hello,

I tried below snippet to hide profile description from regular users only, but it just moves the description on top of the form (it doesn’t hide it). Hide profile settings from regular users - #10 by yevhen

add_filter(
	'hivepress/v1/forms/user_update',
	function( $form ) {
		if(current_user_can('edit_posts')){
			return $form;
		}
		
		unset($form['fields']['description']);

		return $form;
	},
	1000
);

Thank you for waiting. We can not reproduce this issue. Please make sure that there are no other customizations for the user update form that can move the description field to the top of the form.

I see, i had a conflict with another snippet > profile description “required” which i removed. Profile description is now hidden for regular users but also for vendors. It’s only when admin publish/enable the user as vendor that the profile description displays again. Got it :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.