Display user profile with 2 additional fiels (and allow editing them)
-
Hello!
As a WordPress newbie I am trying to create a plugin, which will force users to specify their city and gender while registering and then display a personal profile page for each user showing this information.
I have checked in my plugin in GitHub: wp-city-gender.php.
For the registration part I have followed the Customizing the Registration Form doc and it seems to work fine – the additional city and gender fields are displayed in the registration form and stored later in the wp_usermeta table:
https://i.stack.imgur.com/1soO4.png
My question is: how to add a profile page for each user?
I think it should be a new PHP file inside my plugin, somehow acting as a “template”?
What I don’t want: I can not just create a plain PHP script fetching data from wp_usermeta for a certain numeric user_id – because it wouldn’t be integrated in my WordPress website, i.e. it won’t display the logo at the top and the footer at the bottom.
And somehow I should change the link displayed underneath user avatars to point to that file (is there a hook for that?):
And finally I wonder, how to allow users editing their city and gender information through Users -> Your Profile page in the dashboard?
Thank you
Alex
- The topic ‘Display user profile with 2 additional fiels (and allow editing them)’ is closed to new replies.