Ternstyle

Ternstyle

A web software and design firm

WordPress Members List Plugin Implementation

Create lists of users and display them as directories on your blog with search, sort, and pagination.

Download the PRO version today!

The PRO version has way more features and a sleek fresh design. It comes with an out-of-the-both individual member page which you can customize, not to mention support.

Purchase

WordPress Members List Plugin Implementation

 

First things first, you ned to create a list.

  1. Navigate to the plugin’s “Create a List” page.
  2. Click the “Add New” button.
  3. Name your list and click “Add List.”

 

Now you’ll need to add members to your list.

  1. Navigate to the “Users” tab.
  2. Click on a user you’d like to edit.
  3. Scroll down to the “Members LIst” section.
  4. Click the checkbox beside the list you’d like to add the member to.
  5. Save your changes!

 

Finally add your shortcode to a page.

  1. Navigate to the plugin’s “Create a List” page.
  2. Copy the shortcode of the list you’d like to add to a page.
  3. Edit the page you’d like to add the list to.
  4. Paste the shortcode where you’d like the list in the page.
  5. Save your changes!

 

Sample Code

Once you have created a list you can use a shortcode, like the following, in a page or post:

[members-list list=1 search=true pagination=true sort=true radius=true]

Or you can use this code in your templates:

<?php
	$members = new tern_members;
	$members->members(array('list'=>1,'search'=>true,'pagination'=>true,'sort'=>true,'radius'=>true));
?>

Editing theme template files

Firstly, you must follow these steps:

  • Navigate to your WordPress blog’s theme folder which should be found in /wp-content/themes/the-name-of-your-theme
  • You’ll need to create a new template file entitled “members.php”
    • To do this copy your file entitled page.php and name it members.php.
    • Place the code in “Example 1” on the first line of the file.
    • Remove the code that prints the page content and replace it with the code in “Example 2”.
    • Upload the new file to the server.
  • Now you’ll need to create a new page which you can title whatever you like.
  • Assign this page to the template entitled “Members”
  • Remember to alter your Members List settings to reflect the new name of this page. SeeOptions.
  • That should be it. View the page and you should see the Members List in its moderately useful glory!

Example 1

<?php
/*
Template Name: Members
*/
?>

Example 2

To implement this plugin you only need two lines of code. See below:

<?php
     $members = new tern_members;
     $members->members(array('list'=>1,'search'=>true,'alpha'=>true,'pagination'=>true,'pagination2'=>true,'sort'=>true));
?>

The first line of code initializes the plugin’s class. The second line of code prints your members list to the page.

The Members Function

The “Members Function” has five options available to you. Basically they determine how the page will be laid out.

  • search (bool) – This value determines if the search form will be printed to the page with the members list.
  • alpha (bool) – This value determines if the alphabetical search will be printed to the page with the members list.
  • pagination (bool) – This value determines if the pagination will be printed to the page with the members list.
  • sort (bool) – This value determines if the sort options will be printed to the page with the members list.

WordPress Members List Plugin Implementation

Create lists of users and display them as directories on your blog with search, sort, and pagination.

Connect with us

We dig the back-and-forth.

Copyright © 2018 Ternstyle LLC. All rights reserved.