ternstyle - Lehigh Valley, Allentown, Bethlehem, Easton, WordPress, Lehigh Valley web design, web programming, web development, lehigh valley web hosting, content management tools, website plugins, WordPress plugins, WordPress Themes, php libraries, php classes, javascript libraries, javascript classes, jQuery plugins, web programming, free web software, free php classes, free software

WordPress Members List Plugin Implementation

As of version 2.9 there are now two ways to implement the Members List Plugin.

Short Code

To implement the Members List inline with your content on any page or post use the following syntax (Make sure there are no spaces between the brackets and what is between them):

[ members-list ]

If you’d like to add features like search, alphabetical searching, pagination or sort use the following syntax:

[ members-list search=true alpha=true pagination=true pagination2=true sort=true ]

If you don’t care to use one or more of the features simply remove them from the comma separated list.

NOTE: “pagination2″ is the short-code to place pagination at the bottom of the list.

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('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.
  • pagination2 (bool) – This value determines if the pagination will be printed to the page at the end of the members list.
  • sort (bool) – This value determines if the sort options will be printed to the page with the members list.

Home > Products > Plugins > WordPress Plugins > WordPress Members List Plugin > WordPress Members List Plugin Implementation

Copyright © 2010 Ternstyle Inc. All rights reserved.
site design: ternstyle.us