Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now
  1. Home
  2. Knowledge Base
  3. FAQs
  4. How To
  5. How to Override MemberPress Template Files?

How to Override MemberPress Template Files?

When you use MemberPress, you might want to change the look of your membership-related pages. To change the default designs, you can override MemberPress template files and match the designs to your website's style.

This guide explains how to safely override MemberPress template files and where to find the templates you need.

Why Override MemberPress Templates?

Template files control how your MemberPress pages look and function. These files create the design of important pages like:

  • Registration pages
  • Account pages
  • Pricing pages
  • Thank you pages
  • Login pages

By overriding these templates, you can:

  • Match the design to your brand
  • Add custom elements to specific pages
  • Change the layout of membership components
  • Fix display issues on your site

Override MemberPress Template Files

What You Need Before Starting

To customize MemberPress templates, you need:

  • MemberPress installed and activated on your WordPress site;
  • Access to your website files through FTP or a file manager;
  • A child theme (strongly recommended) to store your modified templates.

Child Theme And Custom Templates Folder

Before creating any custom template files, you must create a folder in your child theme named “memberpress“. You should place all your custom template files related to MemberPress and MemberPress add-ons in this folder.

To create the folder structure for the custom templates folder, follow these steps:

  1. Access your website files through an FTP client (e.g. Filezilla) or a file manager plugin (e.g. File Manager). If available, you can also use the file manager provided by your hosting service.
  2. Go to your child theme folder (usually in wp-content/themes/your-child-theme-name).
  3. Add the folder named memberpress to this folder.

Accordingly, your folder path should be /wp-content/themes/your-child-theme/memberpress/ path. The your-child-theme part in the mentioned folder structure needs to match the name of your child theme folder.

Note: You should apply all your customizations to the files copied to your child theme. These files are saved safely in your custom templates folder, while the original template files get deleted on MemberPress updates.

Finding the Original Template Files

First, you should locate the template files for the designs you want to customize:

  1. Connect to your website using FTP or a file manager through your hosting account.
  2. Navigate to the wp-content/plugins/memberpress/app/views/ folder.
  3. Browse through this folder to find the templates you want to customize. The locations of the most common templates under this folder include:
    • /checkout/form.php – the registration page;
    • /checkout/payment_form.php – the checkout page;
    • /checkout/spc_form.php – the single page checkout (if enabled);
    • /account/ – all account page templates. The MemberPress account uses multiple templates to control different account elements. Thus, under this folder, you will find the following files:
      • home.php – the Home tab;
      • subscriptions.php – the Subscriptions tab;
      • payments.php – the Transactions tab;
      • nav.php – account menu items;
      • password.php – password reset page on the account page;
    • /readylaunch/ – all ReadyLaunch template files (if using ReadyLaunch™).
    • /login/form.php – the login page;
    • /login/forgot_password.php – the password reset page on the login page;

When copying these files, remember to keep the original folder structure.

To illustrate, when copying the Registration page template file, you must create the checkout folder under the /wp-content/plugins/memberpress/app/views/ folder. Then you can add the form.php file to it.

Creating Custom Template Files

To modify any template file, copy the original template file to the custom templates folder. You should do this only for the template files you need to modify.

To override MemberPress template files properly, you must ensure the following:

  • The custom template file names must match the names of the original files;
  • Copy the folder structure after the /views folder, together with the template file.

Adding the template files to your child theme this way will automatically override MemberPress template files. Now, you can apply all modifications to the file you copied.

Example: Overriding the Account Page Template

Let's say you want to customize the Home page on the MemberPress account. The steps would be as follows:

  1. Find the original template at wp-content/plugins/memberpress/app/views/account/home.php.
  2. Navigate to the /memberpress folder in your child theme (wp-content/themes/your-child-theme-name/memberpress)
  3. Create the account folder (if it is not already present) to match the original file folder structure.
  4. Copy the home.php file to your new folder.
  5. Edit the file to make your design changes.
  6. Save the file.

Note: After each MemberPress update, you should check for changes in the original template files to ensure there are no incompatibilities.

Override MemberPress Email Templates

MemberPress emails are located in the /emails folder. Please note that template files for emails sent to administrators (Admin Emails & Notices) use the admin_ prefix. Templates for emails sent to users (Member Notices) have the user_ prefix.

Note: The /emails folder contains template files for the emails listed under Dashboard > MemberPress > Settings > Emails tab.

When you override MemberPress email templates, you need to take an extra step after creating the custom template:

  1. Navigate to Dashboard > MemberPress > Settings > Emails tab.
  2. Find the email whose template file you have overridden.
  3. Click the Reset Defaults button on that line to load your new template.

Override MemberPress Add-On Template Files

MemberPress add-ons are separate plugins that need to be installed and activated on your website to use them with MemberPress. Accordingly, addon-related templates are located in different folders

You can also override templates for MemberPress add-ons using the same approach. The process is similar:

  • The template files for each MemberPress add-on are located in the add-on-specific folders, each containing the app/views/ folder structure.
  • Copy the original template files and the folder structure (after the /views folder) to the /wp-content/themes/your-child-theme/memberpress/ folder.
  • Edit the copied file and save changes.

Below are examples of correctly placing the custom template files for different MemberPress add-ons.

MemberPress Corporate Accounts

  • Original template files are located in: /wp-content/plugins/memberpress-corporate/app/views/
  • Example:
    • Original file to override: mpca-manage-account-template.php (Manage Sub-Accounts Page)
    • Original file location: /wp-content/plugins/memberpress-corporate/app/views/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/mpca-manage-account-template.php

MemberPress Courses

  • Original templates are located in: /wp-content/plugins/memberpress-courses/app/views/
  • Example:
    • Original file to override: courses_list.php (Account Courses List)
    • Original file location: /wp-content/plugins/memberpress-courses/app/views/account/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/account/

On the other hand, if you enable the ReadyLaunch™ Courses/Lessons template, the original template files are located in: /wp-content/plugins/memberpress-courses/app/views/classroom/

  • ReadyLaunch™ Example:
    • Original file to override: courses_header.php (ReadyLaunch Course Header)
    • Original file location: /wp-content/plugins/memberpress-courses/app/views/classroom/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/classroom/courses_header.php

PDF Invoices

  • Original templates are located in: /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice/
  • Example:
    • Original file to override: simple.php or modern.php (Simple or Modern Invoice)
    • Original file location: /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice/
    • Custom templates should be placed in: /wp-content/themes/your-child-theme/memberpress/account/invoice/

Most Commonly Used Addon-Related Templates

MemberPress add-ons are separate plugins that need to be installed and activated on your website to use them with MemberPress. Accordingly, addon-related templates are located in different folders:

  • PDF Invoices: the simple.php OR modern.php file under the /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice folder;
  • Corporate Accounts: separate files for sub-account and corporate account templates located under /wp-content/plugins/memberpress-corporate/app/views/ folder:
    • Manage Sub-accounts page: mpca-manage-account-template.php
    • Corporate Accounts section on Edit profile page: mpca-edit-user-template.php
  • ReadyLaunch™ Courses: MemberPress courses use multiple template files, all located under the /wp-content/plugins/memberpress-courses/app/views/ folder:
    • Courses tab on Account page: the courses_list.php file under the /account/courses_list.php folder;
    • Courses page: the courses_archive_course.php file under the /classroom/courses_archive_course.php folder;
    • Course page: the courses_single_course.php file under the /classroom/courses_single_course.php folder;
    • Course sidebar: the courses_sidebar.php file under the /classroom/courses_sidebar.php folder;
    • Lesson page: the courses_single_lesson.php file under the /classroom/courses_single_lesson.php folder;
    • Certificates: the courses_certificate.php file under the /courses/courses_certificate.php folder.

Override MemberPress Styles Using CSS

Consider using your theme's custom CSS option instead of modifying template files for minor style changes. This approach is often more straightforward for minor design adjustments.

If you need to change CSS, the best way to do that currently is to use a CSS manager plugin (e.g. Custom CSS Manager) to add your own custom styles.

Tip: In case your custom CSS is not overriding MemberPress' default style, you can try to add the !important declaration. This declaration should be added in front of each item you want to modify using CSS.

Important Tips for Template Overrides

  1. Only override what you need: Don't copy all the template files, just the ones you want to change. This reduces the chance of problems with future MemberPress updates.
  2. Check after updates: Template files can change when MemberPress updates. After updating MemberPress, check your custom templates to make sure they still work correctly.
  3. Use CSS when possible: For simple style changes, consider using custom CSS instead of overriding entire template files. This is often easier and less likely to cause problems.
  4. Make backups: Always back up your custom templates before updating MemberPress.

Troubleshooting Template Overrides

If your custom templates aren't working:

  1. Check your folder structure: Make sure the folders and files are in exactly the right place with the correct names.
  2. Verify file names: Make sure your custom template names match the original files exactly.
  3. Clear your cache: If you use a caching plugin, clear the cache to see your changes. Also, clear the server-side or CDN caching if present.
  4. Check for conflicts: Try deactivating other plugins temporarily to check for conflicts.
  5. Verify file permissions: Make sure your template files have the correct permissions (usually 644).
  6. Compare with originals: After each MemberPress update, compare your custom templates with the new originals to check for any significant changes.

Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.