WordPress Member Directory Plugin Tutorial with Searchable Table & Profiles
A WordPress member directory plugin lets you create a list of your organisation’s members. The list of members will appear on a public or private page on your website.
Typically, the members are listed in a WordPress table with options to sort, search or filter to find a particular member.
When someone finds the member they’re interested in, they can click through to read the full member profile.
A new type of WordPress member directory plugin
This is completely different from a WordPress membership plugin. A membership plugin lets you create a private members-only area for your members to log into.
It’s also different from most WordPress member directory plugins. These typically create a fairly basic directory listing all the users from your WordPress website. (I.e. everyone from the Users section of the WordPress admin.) This is fine for some membership directories, but what happens if your members are NOT users in your WordPress admin? There are lots of reasons why your directory of members would contain different people from your list of WordPress users.
This makes it very hard to find a suitable plugin to create a WordPress member directory with profile. Whenever you search for this sort of plugin, you find membership plugins designed to create a protected members-only area of your website. Or members directories listing all your WordPress users.
I’m writing this tutorial to teach you how to build a different sort of WordPress member directory. We’ll use the Posts Table Pro plugin with a couple of free WordPress plugins for creating the member profiles. The members in your directory don’t need to have logins for your website – your users are kept completely separately.
I’ve kept it nice and simple and you don’t need any technical expertise. If you follow the steps in this tutorial, you’ll have your WordPress member directory up and running in no time.
Some WordPress members directory use cases
Before we start, here are some examples of WordPress websites with a searchable member directory with profile. This will help you to understand what’s possible and start planning your own directory of members.
Case study 1 – CEPPs members directory
CEPPs are a charity who support mothers and early childhood. They use the Posts Table Pro plugin to create a WordPress member directory with profiles.
The CEPPS directory of members lists their supporters in a mobile-friendly, fully responsive WordPress table. Each supporter is listed within a custom post type in WordPress. Various information about each member is stored as custom fields, categories and taxonomies. Each piece of data is stored as a separate column in the table. Visitors can sort the table by clicking on any column header. They can search for any keyword by typing into the search box. They can also filter the WordPress member directory by clicking on country, city, type or tag. This makes the member directory really flexible and quick to use.
You can click on a logo, name or ‘Visit’ link to view the individual member profile page. This contains further information about each member.
Case study 2 – SuperConnection consultants directory
SuperConnection have a WordPress member directory listing their expert consultants. Each consultant has attended their training and is available for consultation.
The consultants are listed in alphabetical order with their name and location. You can sort by either column or perform an instant search using the search box. This makes it easy to find a consultant in your area.
You can click from the directory to the individual member profile pages. These include various custom fields about each member including contact details, location map and classes completed.
Consultants directory table:
Member profile page:
If these examples are the sort of WordPress member directory that you want to build, keep reading… This tutorial will teach you how to do the same for your own website. We’ll actually be going even further as I’ll show you how to add extra columns and filter dropdowns to the directory too!
Case study 3 – Private members-only database of authors
Christopher Graham uses our Posts Table Pro WordPress table plugin for his private members directory of thriller, mystery and crime fiction authors.
He was looking for an easily searchable members database that would allow the authors to search for other members with skills or knowledge in a particular area.
When a member finds another member with the skills they are interested in, they can contact them and ask questions.
Christopher set up his WordPress members-only directory by following the instructions in this tutorial, and was delighted with the result. You can read his review of the plugin.
What are your requirements for a WordPress member directory with profiles?
First, it’s important to think about your requirements. What do you want to achieve from your WordPress member directory plugin? This will help you decide if the type of member directory covered in this tutorial is right for you.
Planning your member directory
- Will your WordPress member directory be publicly available or hidden from public view? I’ll show you how to create a public member directory and how to password protect it. If you want to protect it further – for example by making it available to specific groups via a membership plugin – then we won’t be covering this. However the techniques covered in this tutorial can be used anywhere on a WordPress site. This means that you can put it on a page that is restricted using another membership plugin, if you like.
- Can members create and manage their own profiles? This tutorial is about how to create a WordPress member directory with profiles that you will maintain as the website administrator. If you want members to be able to create their own profiles then you’ll need to do some extra work outside of this tutorial. (Bonus tip: You could use the Gravity Forms + Custom Post Types plugin to let members submit their own profiles to the directory. You could even take payment via PayPal if required. New members would complete an online form with their profile information which would then be saved in the ‘Members’ custom post type to be displayed in the directory.)
- Do your members have to be WordPress users? Unlike other membership directory WordPress plugins, you’ll be adding the members as a custom post type in WordPress. The Posts Table Pro plugin we’ll be using as our member directory plugin displays custom post types but NOT WordPress users. If your members are also WordPress users (i.e. they’re listed in the Users section of the WordPress admin) then you can’t list them in the directory. To do this, you’d need to add each member to the ‘Members’ custom post type we’ll be creating in this tutorial.
What information will the WordPress member directory contain?
You should also consider:
- What information do you want to display about each member? Write a list of the data you want to display in the WordPress member directory plugin. This can include various text fields (name, description, experience etc.), one or more images, icons (e.g. linking to their social media profiles) etc. Basically anything you like. You’ll use this later in the tutorial when you create the custom fields for your WordPress directory of members with member profiles.
- How will you structure your WordPress directory of members? As well as the unique data about each member such as their name and email, you’ll probably want to categorise your directory of members. Write a list of the different ways you want users to be able to sort and filter the member directory.
Armed with this information, you’re ready to start building your WordPress member directory.
1. Create a ‘Members’ custom post type
Here’s Part 1 of a video tutorial on creating a WordPress member directory, which covers the initial setup. You can also read full instructions below.
Embed code: <iframe src=”https://www.youtube.com/embed/wGrx8BUsTB4?rel=0″ width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Each member in your directory and their profile data will be stored in a WordPress custom post type called ‘Members’. (Don’t worry, you can call it something else if you prefer.) This will create a ‘Members’ section in the left of the WordPress admin. Each member will be added as a separate ‘post’ within this section.
If you’re a developer, you can create a ‘Members’ custom post type with your usual method. If not, we’ll do it using the Custom Post Type UI plugin.
- Go to Plugins > Add New and search for ‘Custom Post Type UI’.
- Install and activate the plugin.
- Go to CPT UI > Add/Edit Post Types.
- Complete the following fields on the ‘Add New Post Type‘ tab:
- Post Type Slug – Add a lower case label for the post type, e.g. ‘members’. This will be used in the URL for your member profile pages, e.g. www.yoursite.com/members/joebloggs.
- Plural Label – Add a plural label for your Members post type, e.g. ‘Members’. This will appear in the left of the WordPress admin.
- Singular Label – Add a singlular label, e.g. ‘Member’. This will appear when you add a new post in your Members post type, e.g. ‘Add New Member’.
- Now scroll down to the Supports section, ignoring everything in between. (Feel free to check these fields and change them if they’re relevant.) Tick the boxes for the fields that you plan to use for your member profiles. Most member directories will need the title, editor (main content area/description) as a minimum. You may also want a featured image and excerpt. I’ll also show you how to add custom fields and taxonomies later in this tutorial.
- Scroll a bit further to the Built-in Taxonomies section. Tick ‘Categories’ and ‘Tags’ if you plan to use these.
- Click the blue ‘Save Post Type’ button at the bottom of the page.
2. Create your categories, tags & custom taxonomies
Categories, tags and custom taxonomies let you store information that will apply to multiple members in your directory. People viewing your members directory can filter the table to find all the members with a specific category/tag/taxonomy.
For example, you might want to categorise your WordPress member directory by local area. You could create a category, tag or taxonomy for each geographical area. An ‘Area’ filter could appear above the member directory so that users can filter the table for members in a specific area.
These 3 ways of organising content in WordPress are quite similar. To be honest it’s not that important which you use, but here are some tips to help you decide between them:
- Categories – Use WordPress categories as the primary way of organising your member directory plugin. All members should come under one or more categories.
- Tags – Tags are labels that provide extra information about your members. They’re optional and members can have no tags or several.
- Custom Taxonomies – Use these for additional categorisation that you want to use in the WordPress member directory. For example if you’re using your main categories for geographical area then you might want custom taxonomies for any other ways you want to categorise your members.
For example, you might use categories to record the geographical area of each member, e.g. ‘England’. Each member might have some tags relating to their specific skills such as ‘French speaking’ or ‘5+ years experience’. You might have custom taxonomies for ‘Level’ (e.g. Junior, Intermediate or Senior Consultant).
You can create tags when you add the members later, but you need to add the categories and custom taxonomies now.
2a. Create your categories
- Go to Members > Categories in the WordPress admin.
- On the left hand side, add the name and slug (the end bit of the URL) for each category you want to create.
- Click ‘Add New Category’.
- Repeat the process for all the categories you want to create.
Tip: You can create sub-categories by selecting another category as the ‘parent’. However your member directory will list all the categories and sub-categories on the same level, for example in the ‘Categories’ filter dropdown. If you want to list them separately then you should create a custom taxonomy instead. For example, you might be using your top level categories to record each member’s country. Instead of adding the regions within each country as sub-categories, you can create a custom taxonomy for ‘Region’. This will let you list the regions as a separate dropdown filter above the members table, instead of combining the countries and regions in a single list of categories.
2b. Create your custom taxonomies
- Go to CPT UI > Add/Edit Taxonomies in the WordPress admin.
- Complete the following fields in the Add New Taxonomy tab:
- Taxonomy Slug – a lowercase label for the taxonomy (e.g. ‘town’).
- Plural Label – The name for the taxonomy in plural (e.g. ‘Towns’).
- Singular Label – The name for the taxonomy in singular (e.g. ‘Town’).
- Attach to Post Type – Select the Members custom post type.
- Click the blue ‘Save Taxonomy’ button.
Now when you add new members to the directory, you’ll be able to add data to the taxonomy you have added. You can create as many custom taxonomies as you like.
3. Custom fields
Custom fields let you store unique data about your members that isn’t possible within standard WordPress fields. Look at the list you wrote earlier about the data you need in the WordPress member directory. This probably includes things like member name, phone number etc. Mark which items in the list correspond to the following WordPress fields:
- ID – This is the unique ID for the member which is stored in the WordPress database and will be created automatically when you add each member. The ID’s will be non-sequential as they are used for other types of content in WordPress too. You may want to use this to store member ID’s. Or if you want to choose the ID, you should use a custom field instead.
- Title – Use this for the member’s name.
- Content – Use this for the main description on the member profile.
- Excerpt – Use this if you want to display a brief introduction to the member on the main directory page. (If you prefer, you can leave this blank and just display the first few words of the main description instead.)
- Image – Use this for the member’s photo or logo.
- Date – This is the date when the member was added to the website. You can change the date if needed.
Any fields that don’t come under the above list and aren’t suitable for categories, tags or custom taxonomies (i.e. they’re not unique to each member) should be added as custom fields. Examples of the sort of member data you’ll need custom fields for include email address, phone number and date of birth.
3a. Create your custom fields
Once you’ve decided which custom fields you’ll need, it’s time to add them to your Members custom post type. We’ll do this using the Advanced Custom Fields plugin.
- Go to Plugins > Add New.
- Search for ‘Advanced Custom Fields’.
- Install and activate the plugin.
- Go to Custom Fields in the WordPress admin.
- Click Add New Field Group. Enter the name for the group of custom fields you’ll create for your Members post type.
- Now click ‘Add Field’ and add the following information for each of the custom fields you want to create. (e.g. add 1 custom field for ‘Phone’ and another for ‘Email’):
- Field Label – The title for your custom field (e.g. ‘Phone’).
- Field Name – Lower case label for the custom field (e.g. ‘phone’).
- Field Type – Select the method that you’ll use to complete this custom field in the WordPress admin. e.g. select ‘Text’ to add basic information about each member. Or ‘Email’ for an email address. Or maybe a Select dropdown, Check Box or Radio Button to add some pre-set options to choose from.
- Also complete any of the other fields, as needed.
- Location Rules – Select ‘Show this field group’ if post type is equal to your members post type.
Now, your custom fields will appear on the ‘Add New Member’ page. You can store this information about each everyone in your member directory.
4. Add your members to the directory
Now you’ve finished creating the infrastructure for storing your member profiles in the directory. It’s time to add all your members:
- Go to Members > Add New in the WordPress admin.
- Add the member profile using the standard WordPress fields, categories, tags, taxonomies and custom fields you created earlier.
- Click the blue ‘Publish’ button.
- Repeat the process for all your other member profiles.
5. Create your searchable member directory table
The next step is to add a members directory table to a page on your website. This will list all your members, with optional click-throughs to the individual member profile pages.
Here’s Part 2 of my video tutorial on how to create a WordPress members directory with profiles. Or you can read the written instructions below.
Embed code: <iframe src=”https://www.youtube.com/embed/wGrx8BUsTB4?rel=0″ width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
- Buy the Posts Table Pro plugin, download the plugin files from the order confirmation page and copy your license key.
- Go to Posts > Add New in the WordPress admin.
- Click ‘Upload’ and upload the Posts Table Pro files.
- Activate the plugin.
- Go to Settings > Posts Table Pro, enter your license key and click save.
- Go to the page on your WordPress website where you want to add the member directory table. Add the shortcode: [posts_table post_type="members"]. This tells Posts Table Pro to list all your member custom posts in a table. (Note: If you chose something other than ‘members’ as the slug for your custom post type, enter this instead.)
- Save the page and view it.
You will see all your members listed in an interactive table.
6. Customise your WordPress member directory
By default, your member directory table will include columns for title, content, author and date. Some of these are more relevant to a blog than a directory of members. Next, I’ll show you how to customise the columns and various other elements of your WordPress member directory.
The WordPress table plugin Posts Table Pro comes with lots of options to control how your member directory looks and behaves. You can read about all the options in the knowledge base. Here’s a summary of the ones most relevant to a WordPress member directory.
Choose your columns appear in the table
Your members table can include columns for ID, title, content, excerpt, image, date, author, categories, tags, status or any custom field or taxonomy. Add these to the shortcode in the following format. This example will add columns for image, name, excerpt, categories, a custom field called ‘phone’ and a custom taxonomy called ‘level’.[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level"]
Add filter dropdowns to the table
By default, the WordPress member directory includes a search box above the table. You can also add filter dropdowns to let users filter by category, tax or custom taxonomy.
You can enable all possible filters as follows:[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level" filters="true"]
Alternatively, you can add some filters but not others. This example will only show a category filter:[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level" filters="categories"]
Change the order of your members list
The default member directory lists members in the date they were added, with the most recent first. You can change it to sort by any column in the table, or other options such as setting a custom order.
Most WordPress member directory plugins sort the list alphabetically. This shortcode will sort the table alphabetically by name in ascending order (i.e. A-Z).[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level" filters="true" sort_by="title"]
Disable individual member profiles
In the default members table, you can click on a member’s title or image to view their profile page. You can disable this as follows:[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level" links="none"]
This will disable all links in the WordPress member directory. If you want people to be able to click on the categories, tags or taxonomies to filter the table, while still disabling the profile page links, use this instead:
[posts_table post_type="members" columns="image,title,excerpt,categories,cf:phone,tax:level" links="categories,tags,tax:level"] (you may need to change this slightly depending on which taxonomies you’re displaying)
This way, all your members will still be listed in the directory table. But users won’t be able to view separate profile pages for each member.
Advanced: Create a directory listing specific members only
The examples above will list all members in the directory table. If you prefer, you can create multiple tables – each listing different types of member. For example:
- You may want to list members with different skill levels on different pages of your website.
- Alternatively, you might want to divide your member directory page into multiple sections. You might have an ‘Europe’ subheading followed by a table of members in the Europe category. Then you could have an ‘Asia’ subheading and a table of members in the ‘Asia’ category. And so on.
You can add tables containing members with a specific category, tag, taxonomy or custom field. (It’s also possible to create tables with members who were added on a specific day, month or year but you’re less likely to need this.)
7. Test the member profile page
Next, go to the individual profile page for a member and check it looks ok. You can find this by clicking the name of a member in the directory. Or go to the Members page in the WordPress admin, hover over a member and click ‘View’.
By default, the member profile pages will use the same template as the standard blog posts in your theme. The exact content depends on the theme but probably includes the title, content, featured image, tags and categories. There may also be information you don’t want such as date or author. It definitely won’t include any custom fields or taxonomies.
Customising the member profile
This is where it gets a bit tricky. If you’re happy with the member profile page as it is, that’s great. Your custom fields and taxonomies are listed in the member directory table so you may not need them on the individual member profile. If you’ve disabled the links to the member profile pages (see above), that’s fine too.
However if you want to change the content or layout of your member profiles then this requires a bit more technical know-how. The only way to customise the member profile page is to create a new template for the custom post type in your theme or child theme. You then need to edit the code to make the required changes.
This is beyond the scope of this introductory tutorial and if you’re not comfortable editing code, I recommend posting a job on Codeable. Codeable is a well-known marketplace of tried and tested WordPress experts. It’s a good place to find someone good for small jobs like this. Alternatively, the Advanced Custom Fields documentation includes instructions on adding custom fields and taxonomies to your template.
How to password protect your WordPress member directory
If you want your WordPress member directory and profiles to be publicly available then you’ve finished – well done! To create a private members directory, the easiest option is to password protect the relevant page in WordPress.
- Go to ‘Pages’ in the admin and click on the page used for your WordPress member directory table.
- Click the ‘Edit’ link next to ‘Visibility’ in the ‘Publish’ panel at the top right of the screen.
- Choose ‘Password protected’ and enter a password for the page.
- Click the blue Publish or Update button.
You can then give the password to everyone who needs access to the member directory.
For a more advanced solution, you can use a WordPress membership plugin to protect the page, or to create a wider members area. The Groups WordPress plugin offers a simple, user-friendly way to create a protected members area.
Create your own WordPress member directory with profile
Now it’s your turn! I’ve given you all the information to create a fully functional member directory for your WordPress site. You know how to create a ‘Members’ custom post type with various fields of data about your members. I’ve told you how to use Posts Table Pro to create a searchable members directory table. You know how to customise the members table and where to get the resources to edit your member profile template. I’ve even shown you how to hide the member directory from public view.
Once you’ve finished your member directory, you can also use Posts Table Pro to present other types of content. For example, you can use it as a WordPress document library plugin or create a publications library. You can even use it as a WordPress audio library, video gallery or events list.
I’d love to see a link to your own WordPress member directory after you’ve created it. How did you get on? Is there anything I can to do improve this WordPress tutorial? Please leave your comments below.