How to Override Template Files?
When creating a template override, please remember that templates can change overtime. You must check for any incompatibilities after each new stable release of the MemberPress plugin to ensure your templates continue to function properly.
For those of you who are more technically inclined, you can now (MemberPress version 1.1.7+) create a directory in your theme or child theme's base folder named "memberpress." Inside that folder, you can place any of our templates (found in /app/views/…) to override them with your own. However, the folder structure must be maintained. So for example, if you wish to override the /app/views/account/home.php template — you would put the file in /your-theme/memberpress/account/home.php.
We do not recommend copying the entire /app/views/ folder over, but instead just copy over the files that you need to override. This will limit the chance of conflicts with future upgrades to MemberPress. Templates can change over time, so be sure to check for compatibility after new releases of MemberPress. For this reason we strongly recommend that you keep a staging site separately to test new updates on etc before pushing them to a live site.
If you need to change CSS, currently the best way to do that is to use a plugin like Custom CSS Manager to put your own custom styles in. If you're having trouble with your styles overriding MemberPress', you may need to add a !important declaration to them.
Most Commonly Used Template Files
Our commonly used template files and their locations are included in the list below:
- Registration page - /app/views/checkout/form.php
- Checkout page - /app/views/checkout/payment_form.php OR /app/views/checkout/spc_form.php if you are using our Single Page Checkout feature.
- Account page - /app/views/account/ However, the account page uses various templates to control various elements of it. Here is a more detailed break down:
- Home tab - /app/views/account/home.php
- Subscriptions tab - /app/views/account/subscriptions.php
- Transactions tab - /app/views/account/payments.php
- Account menu items - /app/views/account/nav.php
- Account page password reset page - /app/views/account/password.php
- Login page - /app/views/login/form.php
- MemberPress Emails - /app/views/emails/ For brevity, not all email templates will be listed here. Please note that templates with the prefix admin_ are the emails sent to administrators and templates with the prefix user_ are the ones sent to users.