As a site owner, you might have come across specific customizations you need for your Paid Memberships Pro powered website. In this guide, we show you how to add code to your WordPress site right in your site admin.
Using the Code Snippets Plugin
If you would prefer to add your custom code via a plugin file, check out this alternative method on how to create a customization plugin.
Video Demo: Add Code to WordPress
10 Steps to Use the Code Snippets Plugin:
- Navigate to your WordPress admin area > Add Plugin > Search, Install and activate the Code Snippets plugin.
- On the left-hand side of your WordPress admin area, look for Snippets, click on “Add New”.
- Under the “Add New Snippet” box, type in a title. Preferably a description about what the custom code will do on your website.
- Go to the code recipe you want to use, select and copy the code.
- Go back to “Snippets” in your WordPress admin area and in the “Code” section, write or paste in your custom code gist/recipe in that box.
- When pasting in your code, note the
<?phptag is already added by default, do not add that line at the beginning of your code as it will trigger a fatal error.
- If there are any errors in your code such as a missing comma, the editor will indicate an
‘x’sign in front of the line(s) of code with the error.
- By default, the “Run snippet everywhere” select box is checked, do not change that.
- Click on “Save Changes & Activate” to run your custom code recipe on your WordPress site.
- Go test or view the customization that you added to your WordPress site.
We’re Here to Help With Custom Code
Adding customization to your WordPress membership site can at first feel overwhelming, especially for the entry-level WordPress user. Although the Code Snippet Plugin has made this transition easier we recognise some users need help to use and implement custom code to their sites.
If you are having trouble using the Code Snippets Plugin or getting errors in your code recipe, please reach out to our support team in the Member Support Area.