Setting Up The Business Directory WordPress Plugin

One of the things I used to run on my employer's website (it's a lumber yard) was a list of contractors we felt were reasonable and reliable, organized by category. The Business Directory Wordpress plugin seems to fit the bill.

July 31, 2013

The first few steps are similar to those of most plugins.  Install it and activate it.  Next you have to make a page for it, one that includes the shortcode [businessdirectory].  For this tutorial (and I'll probably just leave it up so I can do something useful with it) I made one here called Directory of Open Source Experts.

While there might be a better way, I make a template file for every "static" page I'm going to create.  On this site, I've got a template file for my about page, the contact page, subscribe, and a couple of others..  New pages are easy to make (just go to Pages in the WordPress admin area menu and you can add a new one), but new template files are a little more difficult.  If you have ssh or ftp access, you can easily create a template file.  But if you're in a hurry, or know your wordpress but maybe not the web server account password, the instructions at will get you a new empty template file (that you can edit easily afterward) quickly.

So I have a new page named Directory of Open Source Experts, and a new template file I called business_directory.php.  The page contains, simply, the [businessdirectory] shortcode required by the plugin to work.  business_directory.php looks like this:

// Template Name: Business Directory Page
 * @package WordPress
 * @subpackage Doop

<div id="content">

$my_id = 99999;
$post_id = get_post($my_id);

<h1 class="storytitle"> <?php the_title();?> </h1>

$content = $post_id->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
</div><!-- content -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

And if you set yours up like mine, the only differences should be the html (you'll have to weed through if you've got a pre-built template — mine is pretty dumbed down) and the actual id of the page you created (I've got 99999 here)

You also might want to style the list.  I hate the dots, and so I stuck the line

 #content ul.wpbdp-categories {list-style-type:none;} 

in my template's style sheet, as this is the class of ul that the plugin spits out on the page.  It also happens to be within my content div.  I could get rid of the #content and be fine.

Business Directory Options

So, in the Directory Admin menu (in your WordPress Admin area) you've got to set some things up.  There are so many choices and scenarios, that I can't really go into much here.  Hit me up privately, get hold of the plugins author, or just leave a comment here and I'll see if I can get you going.  My own setup involved changing the Directory Listing Slug to Expert_Niche, and changing the Category Slug to opensource-expert-category.  I unchecked every box on the General and Listings tab, and didn't mess with the other tabs at all.

This setup is simple because I'm not really using it for the creator's intended purpose.  I'm not trying to make money off listings, just trying to provide a good list of reliable folks who provide X service.

As I said earlier, my first run in with the Business Directory was to replace something I'd written from scratch on a lumber yard's site (see it on the Moulton Lumber Find a Builder Page ) that would work with WordPress.  I wanted to list contractors I could trust, and put them in categories (decks, additions, new homes) but I soon had problems.  I'd stuck phone numbers and email addresses in there.  I was contacted one day and asked for a list of contractors.  I gave the caller the url of our business directory page and called it good.  Turns out that this caller was a steel building manufacturer that tried to get these contractors (some said it was harrassment) to sell and build their steel buildings.

I shut the business directory plugin down at that point.  When I fired it back up, I'd removed every contractor's contact info and set up the plugin to contact me.  Now when I hear from a customer (and determine that they are in fact really a potential customer for the builder) I contact the builder and pass along said potential customer's contact info.

I'd like this Open Source Experts section of my site to operate the same way.  As I find people who seem trustworthy and work with open source software, I'll add them to the list.

Like I said, this is just my own set up, and probably a lot simpler than the designer had in mind.  But it does exactly what I wanted it to do.


Leave a Reply

Your email address will not be published. Required fields are marked *