How to add fields to the "account/settings" form?

Hi, how do you add additional fields that the user can update via their account settings?

As on the screen, the other themes offer other fields, so I guess it is possible to add some but how do you do it?

Hi, those are added automatically. For example, the bookings tab, is added when you have installed and activated the bookings extension plugin.

If you would like to add your own custom field. Use this code snippet, and redirect them to the page you would like them to go by inserting a url. Also, you can change the order that it appears in the menu, by changing the number 10. Put from 1-1000. 1 will be nearest to top and 1000 will be all the way on bottom.

add_filter(
	'hivepress/v1/menus/user_account',
	function( $menu ) {
		$menu['items']['custom_item_name'] = [
			'label'  => 'Custom text here',
			'url'    => 'Insert the url here ',
			'_order' => 10,
		];

		return $menu;
	}
);

If you mean adding actual other fields like languages, services, etc. then maybe Hivepress support team, can advise more on this…

2 Likes

Thank you for your help, unfortunately I was talking about adding actual other fields. I hope that the hivepress team will be able to inform me on the subject because I really need it.

Please refer to the linked topic if this issue persists Adding custom fields to the user settings form