How to create a edit profile page for users on frontend with custom fields on wordpress? I tried using profile builder plugin but cannot insert custom fields like gender radio box etc.
Leave a Reply
You must be logged in to post a comment.
How to create a edit profile page for users on frontend with custom fields on wordpress? I tried using profile builder plugin but cannot insert custom fields like gender radio box etc.
You must be logged in to post a comment.
You can add extra user fields in wp-admin, for the users.
Use this in your functions.php, or in your plugin folder:
After that you must save your fields when editing in wp-admin
This functions will add custom fields to your users.
After that, in the frontend, of course you can use wp_insert_user(); function and wp_update_user(); to register and edit a user with all custom fields you created.
You can do that by copy your theme’s page.php to a new file named something like user-profile.php and add to the very top of it this code:
then replace the loop of that page with this one:
and all that is left for you to do is create a new page and select the “user profile” as the page template.
now if all of this is too much you can use some plugins that do the hard work for you like: