User Profile

Create custom front-end user profile

Only two steps to create custom front-end user profile form for your WordPress site by user meta :

Steps 01. Create Form :

Go to User Meta >> Forms and click Add New to create a new form. Enter an unique name in Form Name box (From name
is mandatory*) and click Save Changes. A new form has been made. Select fields from the right, those you want to include in
your profile form. Edit and modify the fields based on your needs. When you have done with editing, click Save Changes.
Now your profile form is totally ready to use.

 

img-01: create form

img-01: create form

 

To change Submit Button Title, Submit Button Class or Form Class select Settings section in the Form Name box. You can
also disable or enable AJAX submit there.

 

img-02: form settings

img-02: form settings

 

Step:02.  Write Shortcode to page or post:

Write user-meta shortcode to page or post for your profile form. To create page go to page >> add new.

Shortcode for profile form:

[user-meta-profile form="Form_Name"]

 

img-03: write shortcode in page or post

img-03: write shortcode in page or post

 

*Change “Form_Name” with your created form name.

Back To Top

User profile shortcode

Write user-meta shortcode to page or post. To create page go to page >> add new.

Profile Shortcode:

[user-meta-profile form="Form_Name"]

Use same form for both user profile & registration:

[user-meta type=profile-registration form="Form_Name"]

Use this shortcode to show profile when uses logged in otherwise show registration form.

Public profile shortocde:

[user-meta type=public form="Form_Name"]

Use this shortcode to show public user profile. To enable public profile, user_id parameter need to provided as GET request. So your profile url should looks like http://example.com/profile/?user_id=123 This feature is useful when you integrate this plugin with third party plugin.

Back To Top

User profile as widget

User profile can be shown as widget. Go to Appearance >> Widgets for available widgets. There will be new widget named User Meta Form.  This widget can be use for showing user profile as widget. In widget configuration set your Action Type as profile and Form Name as your created profile form name.

 

img-01: user profile widget

img-01: user profile as widget

 

 

Back To Top

Profile by Template Tag

Custom user profile can be use as template tag anywhere in your site by using PHP.

$actionType = "profile";
$formName = "my_form";
echo userMetaProfileRegister( $actionType, $formName );

Back To Top

Role based user profile

If you want to show different user profile based on user’s role, it is easy. Suppose, you have three forms: form_1, form_2 and form_3, now you want to show form_2 to all users who have editor role, form_3 to all users who have subscriber role and form_1 to all other users on your site. Then, write following shortcode:

[user-meta-profile form="form_1" diff="editor=form_2, subscriber=form_3"]

Format is: diff=”Role_Name=form_Name”

For widget fill up Role_Name=form_Name format to Diff(optional) input.

 

img-01: role based user profile as widget

img-01: role based user profile as widget

 

For template tag, create an array with role as array key and form name as array value and pass the array as third argument.

Back To Top

Subscribe to our newsletter