The MailChimp extension will be adding support for Interests (also known as Interest Groups) in a future version. Until that is added, there is a way you can utilize Interests now with a little bit of custom code added to your theme’s functions.php file. Continue Reading →
Tips and Tricks
Create a login modal
This tutorial will describe the process of creating a login form modal for WP-Members. The process uses jQuery to display the form overlay and AJAX for logging the user in. jQuery is also used to handle changing the menu link to display as a login/logout link.
(What’s a Modal? Essentially, this is a “popup” that loads over the page. In this case, it will contain a login form that loads in front of the page. The page is dimmed when the modal is active.)
Continue Reading →
Validate Registration Based on MailChimp Subscription Status
This is one of those things that I never thought of but came up in a discussion with a support subscriber. Can registration be validated based on whether a user is subscribed to the MailChimp list or not? If the user is subscribed, allow registration but if not return an error message.
The answer is yes, that’s quite possible. WP-Members allows custom validation via the wpmem_pre_register_data action hook, and the MailChimp extension has an API function (wpmem_mc_get_list_member()) to check a list subscriber’s status. The combination of those two things can be used to accomplish this in a simple code snippet. Continue Reading →
Use jQuery to create a Log In/Log Out menu link
This simple tutorial will help you create a Log In/Log Out menu link that will display a link to the login page when the user is not logged in and a link to log out when they are logged in.
This has now been incorporated into the plugin as a standard feature – all you need to do is add a login link to the menu and give it a custom class of “wpmem_loginout”. See documentation on this feature. This tutorial remains primarily for informational and educational purposes OR if you’d simply like to customize the login/out menu item.
Automatically approve accounts from whitelisted domains
This article is a followup to “Restrict registration to specific email domains, IPs, or other data” that adds an element for moderated registration. In this case, moderated registration is used and registrants with emails accounts from whitelisted domains are automatically approved, leaving all others to be approved by an administrator.
It should be noted that this only applies to WP-Members registration. It has become more common to integrate WP-Members with other plugins that also have registration, such as WooCommerce, BuddyPress, bbPress, etc. If you are using one of these plugins for registration, that’s fine – but you need to then look into their process for custom validation. Continue Reading →