For the recently launched membership website of the Southeastern Bluegrass Association, one of the requirements was a set of member directories (one for Personal members; another for Business members) comprised of member profile pages created and maintained by the members themselves. (I wrote about the project here last month.)
Requirements of the Member Directory
This member directory system had to work in such a way that only active members could create, edit, and display their profiles. In other words, if a member’s membership expires, not only will he or she not be able to edit his or her profile, but any profile previously created by the member would no longer appear on the website.
However, since members can (and we definitely hope will) reinstate their memberships after they’ve lapsed, we needed to make sure that whatever member profile a member may have created at an earlier time will automatically be reinstated when that member’s membership is reinstated.
My Initial Approach
My initial approach was to consider using one of the third-party directory plugins I’ve used for other projects: GeoDirectory, Directories Pro, and Ultimate Member.
The Problem:
The problem I ran up against immediately was finding a way for any of these third-party plugins to communicate with MemberPress, the membership plugin that manages all of the memberships.
Each of these directory plugins has its own registration and payment subsystem. However, it was already established that we’d be using MemberPress to handle those functions as well as content restriction, so the problem was to figure out if and how we could make MemberPress tell the Directory plugin when someone’s membership has commenced, elapsed, or renewed.
The Solution
The solution was not to use any third-party plugin at all. Instead, I created the functionality by tapping into WordPress’ native user metadata infrastructure.
Here are some screenshots of the directory system.
If you’re interested in details of how this membership system was built, let me know in the comments below. Spoiler alert: Advanced Custom Fields Pro is at the heart of the solution.
Leave a Reply