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 Template Files?

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 to override them with your own. All of our templates can be found in the ../app/views/ folder in the MemberPress plugin files.

When adding a template file you need to keep the directory structure after the “views” folder intact. 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.

Examples

Template MemberPress File Location Overriden Template Location
Registration Page plugins/memberpress/app/views/checkout/form.php themes/your-theme/memberpress/checkout/form.php
Account Home Tab plugins/memberpress/app/views/account/home.php themes/your-theme/memberpress/account/home.php
User Set Password Email plugins/memberpress/app/views/emails/user_set_password.php themes/your-theme/memberpress/emails/user_set_password.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.

PDF Invoices

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.

Corporate Accounts and Courses

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.

Template MemberPress File Location Overriden Template Location
Course Bookmark plugins/memberpress-courses/app/views/courses/courses_bookmark.php themes/your-theme/memberpress/courses/bookmark.php
Manage Sub-Accounts Page plugins/memberpress-corporate/app/views/mpca-manage-account-template.php themes/your-theme/memberpress/mpca-manage-account-template.php

CSS

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 breakdown: 
    • 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
  • ReadyLaunch Templates – all files in /app/views/readylaunch 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
    • Certificates/plugins/memberpress-courses/app/views/courses/courses_certificate.php
Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.