How to Override Template Files?

When creating a template override, please remember that templates can change over time. You must check for any incompatibilities after each new stable release of the MemberPress plugin to ensure your templates continue to function correctly.

Video Overview

General Instructions

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.

The PDF Invoice template files should be put to /your-theme/memberpress/account/invoice/simple.php for the Simple and /your-theme/memberpress/account/invoice/modern.php for the Modern template.

Since MemberPress Corporate Accounts version 1.5.18 and MemberPress Courses version 1.0.25 you can also override templates in MemberPress Corporate Accounts and MemberPress Courses Add-ons. When you create custom templates for MemberPress Corporate Accounts and MemberPress Courses add-ons you should still keep folder structure under /memberpress-corporate/app/views/ folder for MemberPress Corporate Accounts and /memberpress-courses/app/views/ folder for MemberPress Courses. In both cases, custom template should be inserted into /your-theme/memberpress/ folder.

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
    • Password reset page of the Login page - /app/views/login/forgot_password.php
  • Pro Templates - all files in /app/views/pro-templates folder if you are using our ReadyLaunch feature (available since MemberPress 1.10.0)
  • 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.
    • If you want to override one of the Email Templates in the Settings (MemberPress->Settings->Emails) then after you add or update the template file in your theme folder, you need to go to MemberPress->Settings->Emails and click "Reset Defaults" to load the new template. 
    • For example, user_receipt.php, you would need to update in MemberPress Settings:

  • PDF Invoices - /plugins/memberpress-pdf-invoice/app/views/account/invoice/ you'll see modern.php and simple.php files.
  • Corporate Accounts - /plugins/memberpress-corporate/app/views/ Here is a more detailed break down: 
    • Manage Sub-accounts page - /plugins/memberpress-corporate/app/views/mpca-manage-account-template.php
    • Corporate Accounts section on Edit profile page - /plugins/memberpress-corporate/app/views/mpca-edit-user-template.php
  • Courses - /plugins/memberpress-courses/app/views/ Here is a more detailed breakdown: 
    • Courses tab on Account page - /plugins/memberpress-courses/app/views/account/courses_list.php
    • Courses page - /plugins/memberpress-courses/app/views/classroom/courses_archive_course.php
    • Course page - /plugins/memberpress-courses/app/views/classroom/courses_single_course.php
    • Course sidebar - /plugins/memberpress-courses/app/views/classroom/courses_sidebar.php
    • Lesson page - /plugins/memberpress-courses/app/views/classroom/courses_single_lesson.php
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.