For WP-Members users who want to do heavy customization to the plugin’s default forms, the PHP str_replace function can be both your best friend and your arch nemesis. Continue Reading →
Tips and Tricks
Move form label for checkboxes with a filter
Suppose you want to move the text label for a checkbox the default layout of the registration form. You would like to move it to be to the right of the checkbox. How can that be done?
The WP-Members registration form has a basic default layout. This is necessary for it to be functional in a wide variety of uses, themes, etc. But what if you need something a little different? Well, it is very customizable and flexible with filter hooks that allow you to use a function to filter the form before it is displayed. Continue Reading →
Email users when a new post is published – opt-in/opt-out version
This code snippet is an extension of the email users when a new post is published snippet. Like that snippet, this one comes from user requests.
The difference here is that we will only email users who have requested specifically to be notified of new posts, and we’ll allow them to opt-out of that process at a later date by updating their profile. Continue Reading →
Clean up the user profile of unused unwanted fields
The WP-Members plugin does not exercise any control over WordPress native fields as far as removing them from the User Profile. The plugin only determines if you are using these in the front-end elements of the plugin (such as front-side registration and front-side user profile). If you are not using a handful of these fields and would like to remove them from the User Profile (yoursite.com/wp-admin/user-edit.php), you can do that with a little bit of scripting in your functions.php file. Here are some examples. Continue Reading →
Utility function to determine if a user registration is pending with the PayPal addon
For users that are diving into customizing their installation and using the PayPal addon, here is a utility function that will allow you to determine if a registered user is pending (i.e. they have not yet paid). This can be useful for content display that you may intend for any registered user regardless of payment status, or some other use.
I use this function on the test.rocketgeek.com site to display information on which posts are free and which a only for paid premium users. This information displays if the user is not logged in OR if they registered and are logged in but did not yet complete payment. Continue Reading →