Adding your custom profile templates
This guide shows you how to easily add custom profile templates that will be compatible with plugin updates, you can put in the child theme. The templates you add will become selectable when you customize a profile form or login form, or a register form in the Template dropdown.
- Requires version 1.0.62 or later
- Your custom templates can be saved in your child theme folder or in plugin folder. However it is advised to save them in child theme as plugin updates will remove any extra files that you’ve added.
How to add a template
- The first step you need is to create this folder if you have not done so already:/your-child-theme/ultimate-member/templates/
- In that folder you can create your additional templates. Each template have to be prefixed with the profile template type that you want. e.g. to create additional login templates, the file would have to be called: login-mycustomlogin.php You can prefix it withregister-if you wanted to add registration templates and so on.
- You have to make Ultimate Member recognize this template as a supported template. You can do so by adding the following line to the top of your custom template(s):
<?php /* Template: Login 2 */ ?>
Adding that line on top let the plugin know which template file is it (please use the same formatting) and make it selectable in the Template selection dropdown when customizing a form.
That’s it. When you try to customize your profile forms you can see the additional templates you created and placed in your child theme folder.
How to add a profile template
- Copy the file /wp-content/plugins/ultimate-member/templates/profile.php into the directory /wp-content/themes/YOUR-THEME/ultimate-member/templates/
- Rename new file, use the name like profile-one.php or profile-mine.php
- Open a new file and add the comment with template name under the PHP starting tag. See example below. Change what you need and save the file.
<?php /* Template: Profile One */
Once new profile templates are added you'll them in the options of these settings:
- Profile Default Template on [wp-admin > Ultimate Member > Settings > Appearance > Profile]
- Template on [wp-admin > Ultimate Member > Forms > Edit Form (profile)]
Image - The setting "Profile Default Template"
Image - The setting "Template"