WordPress Plugin: Chamber Directory

Our Chamber Directory plugin for WordPress allows you to quickly dump a spreadsheet into WordPress to create a searchable, sortable database. Automatically links business names to Posts. Use shortcode [chamberdirectory] on a Page to display the directory. Other options (also configurable in Plugin List Options) include [chamberdirectory searchbox=true categorylist=true azlist=true].

A demo is usually available at mediaworkstudio.net/chamber/chamber-directory-list/ (though we may be testing one thing or another, so call ahead!)

All it takes is three easy steps the first time you use it. Later, you can re-import new data whenever you desire, without needing to update other settings.

  1. Import your data
  2. Configure the Post display
  3. Configure the List display

Why not a full-fledged database?

We found that many chambers of commerce and other business groups already have an existing membership management system. Going to the web with it is usually too big of an operation, and would involve too many changes in workflow. However, it is generally easy to export a list of members from whatever system you’re using, so our goal is to make it as painless as possible to update the web directory. Leveraging the ease-of-use of WordPress allows you to also customize listings for some members.

Displaying the Data

All of the display is handled by one page. It uses http GET parameters to do pagination, search, etc.

Either include the shortcode [chamber_directory] in a Page,
or (for advanced users) create a page template that echoes the text returned by the chamber_directory_list_display() function.

If you want to override a few of the settings in this plugin, options for the shortcode include:

  • azlist=true (displays the A-Z bar)
  • searchbox=true (displays the Search box)
  • categorylist=true (displays a list of directory categories)

Displaying a single record

A key concept of this plugin is that you might want to have “enhanced” listings for some entries in your directory. Typically, when you click on a business name in the list, it will display the spreadsheet information (as configured with the Post Display). But, if you want more design and content control, you may create a Post for each business. Then, when you have a Post with a title that matches the business name, that Post will display when you click on a link in the list, instead of only the brief information found in the spreadsheet. (You can configure this so that the match occurs on the Post’s ID or Permalink, instead.) In the Post Display configuration panel, you may specify where you would like to display the information from the spreadsheet (above or below the Post content), and there is also an override to specify your own shortcode to use within any Post, so you can be fairly freeform about it.

Categories

Through the use of one field with a list of categories, you can also create a page or popup of categories. Create one column in your spreadsheet that has a comma-delimited list of categories, and the plugin will automatically create links. (You may also specify a different delimiter than a comma.) It is conceivable that you may also devise some handy way to use the WordPress built-in Category field to organize your listings, but in that situation you would probably need to have one Post per entry in your spreadsheet.

Customizing your display

The elements of the List display are tagged for CSS.

Version history

Version 1.0 deployed, not yet ready for public distribution

Road map

In general, we don’t want to get too fancy with this– it’s designed to be a quick, low-cost, low-impact solution. If you want something really fancy, request a quote (and consider doing a full fledged database).

Conceivably, you could create a user permission scheme where a matching email address in your spreadsheet would match a username in the WordPress database.

Protect email addresses from spam harvesting, by adding a behind-the-scenes mailer, so actual email addresses are not displayed.

single.php