Custom fields not updating | WordPress.org

[ad_1]

Hello @norbertk

There are errors in the gist code. For example an error on saving occurs here:

$submitted = array_map( 'sanitize_text_field', $_POST[$name] );

PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given

I recommend you to enable debug logging if you write a custom code. Seeing errors in the log helps a lot.

Do you want to add the Mobile Number (mobile_number) field to the first tab Account? Use a solution described in this article: How to display pre-defined fields in Account

You can use a free extension Ultimate Member – Account tabs to display more fields in Account. This extension can create custom account tabs and can embed a profile form into the custom account tab.

Regards

The Account tabs extension is just what I’m looking for!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer