Simple Membership Plugin › Forums › Simple Membership Plugin › Customization of view files
- This topic has 3 replies, 2 voices, and was last updated 4 years, 6 months ago by
admin.
-
AuthorPosts
-
January 25, 2022 at 2:15 am #23519
Eldon McGuinness
ParticipantReplacing SWPM files with custom versions.
I noticed on the article titled “Customizing the look of the membership login widget”, talks about cloning a couple of internal files and putting them in as part of your theme to customize the look and feel of those pages. Is the same possible for the following files:
./views/add.php ./views/edit.phpIs there a write-up for which files this works?
In case anyone is curious, the article is, Customizing the Look of the Membership Login Widget, it mentions that you can do this with the following files:
./views/login.php ./views/loggedin.phpJanuary 27, 2022 at 7:53 am #23531admin
KeymasterNo, it won’t work on those admin side files.
It only works on the following front-end functionalities:
– Login shortcode
– Edit profile shortcode
– Password Reset shortcodeJanuary 27, 2022 at 1:55 pm #23533Eldon McGuinness
ParticipantIs there any way to achieve this same functionality for the mentioned pages? I find myself in a bit of a dilemma where I have to either use the forms as they are OR create my own “branch” of the plugin and merge in changes as they come. I know there is a custom form plugin that is a premium option, but in this case, I’m not so much concerned about the information being captured, but more so about the UX of the form/pages.
January 28, 2022 at 7:51 am #23535admin
KeymasterUsing filter hooks should be useful for this.
I think you should be able to use the following filter hooks to specify your own template file path that will load your customized copy of the file.
Add User (Admin End):
https://github.com/wp-insider/simple-membership/blob/cb524cd05130e34114ee9392c5aef0f695d757f0/simple-membership/classes/class.swpm-members.php#L260The following filter hook can be useful also:
swpm_admin_registration_form_overrideEdit User (Admin End):
https://github.com/wp-insider/simple-membership/blob/cb524cd05130e34114ee9392c5aef0f695d757f0/simple-membership/classes/class.swpm-members.php#L287If an additional filter or action hook is needed, you can create a pull request with the suggested hook.
-
AuthorPosts
- You must be logged in to reply to this topic.