Editing UserRegistration plugin’s file from plugin directory is not recommended as all the changes will be lost after upgrading.
So, UserRegistration has introduced template files which contain the markup and template structure for frontend.
Template files can be found within the /user-registration/templates/ directory: View template file
On those files, you will see all the hooks that allow you to add or move content without needing to edit template files.
To override plugin’s template file:
- Create a folder naming user-registration inside your theme like: themes/yourtheme/user-registration/myaccount.
- Copy the template file from plugins/user-registration/templates/myaccount folder maintaining same folder structure to themes/yourtheme/user-registration directory created before.
Suppose, you need to edit dashboard,
-> Go to wp-content/plugins/user-registration/templates/dashboard.php
-> Copy this file.
-> Go to wp-content/themes/your-choosen-theme/ and create a folder user-registration and inside this folder create folder myaccount.
-> Paste the copied dashboard.php file here and edit to your requirements. This file will override the plugin’s file.
Basically, the path to be: yourtheme/user-registration/myaccount/dashboard.php
Now, the copied file will override the UserRegistration default template file.
It means you can add/edit codes in the newly copied file to make changes to our plugin’s template file.
Also, you can left the endpoint empty from User Registration->Settings->Geneal to hide the default tabs.
You may also want to know How to add additional endpoints in my account tab.