Many of our articles and code recipes include instructions to customize and add this code to your “active theme’s functions.php file” or “a custom plugin”. In addition, our support team may provide you with customizations to add to your site via the support forums.
This tutorial explains how to create and edit the custom plugin for all of your tweaks to Paid Memberships Pro and any Add Ons you are using.
First, figure out how to FTP into your Website
While many of our add ons can be installed directly via your WordPress Dashboard, the customizations plugin is one instance where knowing how to use FTP to “put” or “edit” files on your web server is very important.
Your web host should have provided you with FTP or SFTP credentials. To properly log in to your web server you will need the:
- FTP (or SFTP) address
- (possibly) a port number and root directory
If you don’t know how to use FTP, this guide on the WordPress Codex provides some background on FTP and options for FTP clients, you can also refer to your web host’s FAQs and guides.
Creating Your Customizations Plugin
While you could place code customizations in the functions.php file of your active theme (or child theme), we strongly recommend using the customization plugin method. The primary reason for using a plugin is so that your development team knows exactly WHERE the custom code is located as it relates to your Paid Memberships Pro setup. It also helps keep customizations separate of theme updates or changes (which can be lost when a theme update is performed).
So, here’s how to create the customizations plugin:
- Create a folder called
wp-content/pluginsfolder of your site.
- Create a file called
pmpro-customizations.phpin the folder you just created.
pmpro-customizations.phpfile and paste this block of code into the file:
<?php /* Plugin Name: PMPro Customizations Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ Description: Customizations for Paid Memberships Pro Version: .1 Author: Stranger Studios Author URI: http://www.strangerstudios.com */ //Now start placing your customization code below this line
- Add the code for the recipe you are doing at the bottom of
- Save the File and upload the folder and file to your website via FTP.
- Navigate to ‘Plugins’ in your WordPress Dashboard and activate the PMPro Customizations plugin.
This Makes Me Nervous.
We understand that you may not be completely comfortable working “in the code”. Our support team can put minor code tweaks in place for you if you share FTP information in a private thread.
If you are updating the customizations on your own and an update to the customizations plugin completely breaks your site, don’t fret.
These steps should repair your site:
- Connect to your website via FTP and navigate to the
- Rename the folder
pmpro-customizationsto anything else (I generally rename it to
- Now, visit your site. WordPress will automatically deactivate the plugin and, in doing do, your site should be restored.
- You can then repair any broken code in the file and rename the folder to the original
- Upload the updated file and reactivate the plugin via the ‘Plugins’ dashboard page.
Need to customize the appearance (CSS/stylesheet) of Paid Memberships Pro?
We have a separate guide that covers setting up CSS stylesheet for customizations to your Paid Memberships Pro-powered membership site.