The Custom Messages Addon allows you to customize the content protection messages that get output from the membership plugin. This is useful if you are not running a ‘typical’ membership site.
Installation
Download the custom messages addon.
Addon Usage
After you install this addon, go to the “Custom Message” menu from the admin dashboard of the membership plugin.
It is here you will see a number of fields where you can enter text of your choosing. The text you enter will then replace the typical message output by the membership plugin.
You can override the default message of the plugin by specifying a custom one.
Message Customization Example
Lets say you wanted to customize the following standard post/page protection message:
Go to the “Custom Message” menu and enter your message in the “Restricted Post (No Logged In)” field to customize it.
A customized example that you may wish to base your own off can be found below:
'Wishing to view this content? Why not <a href="https://www.yourloginpage.com">Login</a> or <a href="https://yourjoinuspage.com">Join Us Now</a>.
List of Customization Options
Below you can find a screenshot that includes all the messages that you can customize when using this addon on your WordPress site. After you have completed your custom messages ensure you click the Save Changes button.
Using HTML Code
You can use HTML code in the custom message also. So for example, you could use something like the following:
This is a custom message. Here is a test <a href="example.com">link</a>
Or something like the following so you can customize the output using CSS:
<div class="swpm-custom-expired-msg">Your account expired. This is a custom message that I can tweak with CSS too.</div>
Customizing the Appearance of the Message Using CSS
You can attach a CSS class to your message by using the HTML Code option (see the above example in this page).
Once you attach a CSS class to the message, you can target the CSS class and apply CSS tweaks to customize the appearance of the message (example: make the font color red).
Example: The following CSS tweak will make the “Account Expired” message (see the above example where we used this HTML code) appear in a box by applying a border and padding to it:
.swpm-custom-expired-msg{ border: 1px solid #CCCCCC; padding: 10px 20px; }
You can add custom CSS tweaks to your site by adding the CSS code in the following interface of your site:
Appearance -> Customize -> Additional CSS