MemberPress default pages, emails, courses, and other addon-related pages have default designs. Each design is located in a separate template file in the MemberPress plugin files. To modify or replace these designs with your custom ones, you must override MemberPress template files.
This document explains how to override MemberPress template files and where to find the templates you need.
Override MemberPress Template Files
Before creating any custom template files, you must create a directory in your child theme folder named “memberpress“. In this folder, you should place all your custom template files related to MemberPress and MemberPress add-ons.
To create the folder structure for the custom templates folder, follow these steps:
- Access your website files through an FTP-Client (z.B.. Filezilla) oder eine Dateimanager Plugin (z.B. Datei-Manager). Falls verfügbar, können Sie auch die Dateimanager, der von Ihrem Hosting bereitgestellt wird Dienstleistung.
- Navigieren Sie zu /wp-content/themes/ Ordner.
- Find and access the folder of your child theme.
- 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.
Overridden Template File Location Examples
Vorlage | MemberPress File Location | Überschriebener Vorlagenort |
Anmeldung Seite | plugins/memberpress/app/views/checkout/form.php | themes/your-child-theme/memberpress/checkout/form.php |
Registerkarte Konto-Startseite | plugins/memberpress/app/views/account/home.php | themes/your-child-theme/memberpress/account/home.php |
Benutzer Passwort festlegen E-Mail | plugins/memberpress/app/views/emails/user_set_password.php | themes/your-child-theme/memberpress/emails/user_set_password.php |
Creating Custom Template Files
You can find all MemberPress template files in the /wp-content/plugins/memberpress/app/views/ Ordner. To modify any template file, copy the default template file from this folder to the custom templates folder.
You should do this only for the template files you need to modify.
To override MemberPress template files, custom template file names must match the default file name.
In addition, when adding a template file, you must keep the directory structure after the /views folder intact.
For example, the MemberPress account home page template file (home.php) is located in the /wp-content/plugins/memberpress/app/views/account/ folder. Here, you will notice that the additional Konto folder is present. Deshalb, the path for the custom MemberPress account home page template file must be /wp-content/themes/your-child-theme/memberpress/account/home.php.
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.
Most Commonly Used MemberPress Template Files
As previously mentioned, MemberPress templates are located in the /wp-content/plugins/memberpress/app/views/ Ordner.
Further below, you can find the path for each of the most commonly used MemberPress template files:
- Registration page: the form.php file under the Zur Kasse folder (/checkout/form.php)
- Checkout page: die payment_form.php file under the Zur Kasse folder (/checkout/payment_form.php)
- Einzelne Seite Checkout: the spc_form.php file under the Zur Kasse folder (/checkout/spc_form.php).
- Konto Seite: all templates for MemberPress account pages are located under the Konto folder. The MemberPress account uses various templates to control various elements of it:
- Home tab: die home.php file (/account/home.php);
- Subscriptions tab: die home.php file (/account/subscriptions.php);
- Transactions tab: die payments.ph file (/account/payments.php);
- Account menu items: die nav.php file (/account/nav.php);
- Account page password reset page: die password.php file (/account/password.php).
- Login-Seite: the form.php file under the Anmeldung folder (/login/form.php).
- Password reset page of the Login page: die forgot_password.php file under the Anmeldung folder (/login/forgot_password.php)
- ReadyLaunch Templates: If you enabled ReadyLaunch pages, these designs have their own separate template files. All ReadyLaunch template files are located in the /readylaunch Ordner.
When copying these files, remember to keep the mentioned folder structure. To illustrate, for the Registration page template, you must create the Zur Kasse folder under the /wp-content/plugins/memberpress/app/views/ folder. Then you can add the form.php file to it.
Override MemberPress Email Templates
MemberPress emails are located in the /emails/ folder. Please note that templates with the prefix admin_ are used for the emails sent to administrators. Templates with the prefix Benutzer_ sind die, die an die Nutzer gesendet werden.
Suppose you want to override one of the Email Templates in the Settings (Dashboard > MemberPress > Einstellungen > E-Mails). In that case, after you add or update the template file in your theme folder, you should go to Dashboard > MemberPress > Einstellungen > E-Mails und klicken Sie Reset Defaults to load the new template. For example, in the case of the user_receipt.php file, you would need to update in MemberPress Settings:
Override MemberPress Add-On Template Files
To override MemberPress template files related to add-ons, copy the add-on template files to the /wp-content/themes/your-child-theme/memberpress/ Ordner.
The default template files for each MemberPress add-on are located in the add-on-specific folder, which contains the app/views/ folders. In this case, you must also keep the directory structure present after the /views folder intact.
Below, you can find examples of how to place the custom template files for different MemberPress add-ons properly.
Once you copy the template file to the proper folder, you can apply the modifications you need.
PDF-Rechnungen Add-on Template Files
The PDF Invoice template files are located /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice folder. Here, you can find both Simple and Modern invoice templates:
- Simple PDF Invoice: the einfach.php file (/account/invoice/simple.php);
- Modern PDF-Rechnung: the modern.php file (/account/invoice/modern.php);
Accordingly, they should be placed in /wp-content/themes/your-child-theme/memberpress/account/invoice/simple.php for the Simple template.
Similarly, for the Modern template, use the /wp-content/themes/your-child-theme/memberpress/account/invoice/modern.php Pfad.
Corporate Accounts Add-on Template Files
Die MemberPress Firmenkonten template files are located /wp-content/plugins/memberpress-corporate/app/views/ Ordner.
In this case, you should only add the files in the following way:
Vorlage | MemberPress File Location | Überschriebener Vorlagenort |
Seite Unterkonten verwalten | plugins/memberpress-corporate/app/views/mpca-manage-account-template.php | themes/your-child-theme/memberpress/mpca-manage-account-template.php |
MemberPress-Kurse Add-on Template Files
Die MemberPress-Kurse template files are located /wp-content/plugins/memberpress-courses/app/views/ Ordner.
On the other hand, if you enable the ReadyLaunch™ Courses/Lessons template, these template files are located under /wp-content/plugins/memberpress-courses/app/views/classroom/ Ordner.
In this case, you should only add the files in the following way:
Vorlage | MemberPress File Location | Überschriebener Vorlagenort |
Kurs-Lesezeichen | plugins/memberpress-courses/app/views/courses/courses_bookmark.php | themes/your-child-theme/memberpress/courses/bookmark.php |
ReadyLaunch Course Header | plugins/memberpress-courses/app/views/classroom/courses_header.php | themes/your-child-theme/memberpress/classroom/courses_header.php |
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-Rechnungen: the einfach.php OR modern.php file under the /wp-content/plugins/memberpress-pdf-invoice/app/views/account/invoice folder;
- Firmenkonten: separate files for sub-account and corporate account templates located under /wp-content/plugins/memberpress-corporate/app/views/ Ordner:
- 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/ Ordner:
- Courses tab on Account page: the courses_list.php file under the /account/courses_list.php folder;
- Kurse page: the courses_archive_course.php file under the /classroom/courses_archive_course.php folder;
- Kurs page: the courses_single_course.php file under the /classroom/courses_single_course.php folder;
- Kurs-Seitenleiste: 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;
- Bescheinigungen: the courses_certificate.php file under the /courses/courses_certificate.php Ordner.
Override MemberPress Styles
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. If you're having trouble with your styles overriding MemberPress, you may need to add an important Erklärung an sie.