• Hi,

    I am slowly getting my site up and running on wordpress however have hit a road block.

    I am wanting users to edit their profile but don’t want them to be able to access the back end ‘admin view’.

    The events manager creates new fields on the Your Profile field that I would like users to edit themselves from the front end but I can’t seem to find a way to display the Your Profile view With all the fields on the front end.

    Is this possible? Is there any shortcode for the ‘Your Profile’ that I could use?

    Thanks

Viewing 1 replies (of 1 total)
  • Hi there,

    Have you found a solution yet? Editing of user profiles at front-end is not an easy task and needs some knowledge about php and html. Are you comfortable with some php code? if not, you may need a developer to help you with this.

    What plugin are you using that creates the custom fields? If you have access to phpmyadmin, you can find out the name of the custom fields from the database table, and how the data are stored. The name of custom fields are usually stored in a table called wp_usermeta, in the column called meta_key. if you have changed the table prefix during installation, the table name will be your prefix followed by usermeta. you can search by user_id and see what custom fields are there.

    if the data is stored in wp_usermeta table as plain text and numbers the same way as it was entered, you can create a page at the front-end for users to edit profile using the following approach.

    here are the steps involved.

    1. install and activate a plugin called pods,

    2. in pods admin panel, extend the existing content type User, use default meta storage, and create custom fields with the same name as the custom fields created by your plugin.

    3. create a page template in your theme folder. if your page slug is edit-profile, your page template needs to be named page-edit-profile.php.

    4. you need to use an if statement to check the user login status and retrieve their user id, and wrap the code to output the edit form.

    5. you may use an array to specify what fields to show in the form, and use the “form” function to output an eidt form. Please refer to the documentation on pods.io website for detailed instruction about how to use the “form” function. there is a short code for pods form but you still need to check user login status as mentioned in the above step.

    in this approach we use pods to retrieve custom fields data from user meta table, update it, so that the other plugin can use the same data later.

    This approach will not work if the other plugin stores data in an encoded format. It is still possible but some development work will be required.

    please let me know if it works for you.

    Oliver

Viewing 1 replies (of 1 total)

The topic ‘Front End User edit profile’ is closed to new replies.