In lots of these recipes, you will see the instructions to add some bunch of code to the “active theme’s functions.php file” or “a custom plugin”. This covers how to create the custom plugin.
First, figure out how to FTP into your Website
While a lot of the WordPress plugin and theme installation is handled right in your WordPress Dashboard, this is one instance where knowing how to and using 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. You will need the FTP address, username, password, and (possible) 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 ask your web host or Google.
Creating Your Customizations Plugin
While you could put customizations into your active theme’s (or child theme’s) functions.php file, we strongly recommend using the customization plugin method. This way you and your development team know exactly WHERE the custom code is located as it relates to your Paid Memberships Pro setup.
- Create a folder called
wp-content/pluginsfolder of your site.
- Create a file called
pmpro-customizations.phpin the folder you just created.
pmpro-customizations.phpand paste this code into it:
<?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 */
- Add the code for the recipe you are doing at the bottom of
pmpro-customizations.php(after the last */).
- 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.
If at any time you make an update to the customizations plugin and your website completely breaks, 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.
Customize the CSS/Stylesheet of Paid Memberships Pro
We have a separate guide for help setting up CSS stylesheet for customizations to your Paid Memberships Pro-powered membership site.