Docs Build Your Directory Site

Build Your Directory Site

A complete step-by-step guide from installation to launch.

This tutorial walks you through every step of building a fully functional directory website with Local Directory. By the end, you will have a professional directory with categories, locations, maps, search, listings, and optionally, paid listing packages.

1. Planning Your Directory

Before touching WordPress, spend 20 minutes planning your directory structure. A clear plan now saves hours of reorganizing later.

Choose Your Niche

The best directories focus on a specific niche rather than trying to list everything. Some proven niches:

  • Restaurants & food — cafes, bars, food trucks, bakeries
  • Local services — plumbers, electricians, cleaners, movers
  • Real estate — rentals, properties, agents, agencies
  • Tourism & travel — hotels, attractions, tours, activities
  • Healthcare — doctors, dentists, clinics, therapists
  • Education — schools, tutors, courses, training centers

Plan Your Category Structure

Sketch out 3-8 top-level categories with subcategories under each. For example, a city directory might use:

Restaurants
  ├── Italian
  ├── Japanese
  ├── Mexican
  └── Fast Food

Shopping
  ├── Clothing
  ├── Electronics
  └── Groceries

Services
  ├── Plumbing
  ├── Electrical
  └── Cleaning

Health & Wellness
  ├── Doctors
  ├── Dentists
  └── Gyms

Plan Your Location Hierarchy

Decide how locations will be organized. Common patterns:

  • Country-wide directory: Country > State > City
  • City directory: City > Neighborhood / District
  • Regional directory: Region > City

Decide on Listing Fields

Think about what information each listing should contain. The plugin includes these fields by default: title, description, address, phone, website, email, opening hours, and photos. Consider whether your niche needs additional custom fields like price range, cuisine type, or specialties.

Tip: Start simple. You can always add more categories, locations, and fields later. It is easier to expand a clean structure than to reorganize a messy one.

2. Installation & Initial Setup

Get the plugin installed and configured with your basic settings.

  1. 1

    Install the Local Directory plugin via Plugins > Add New > Upload Plugin in your WordPress admin, or search for "Local Directory" in the plugin directory.

  2. 2

    Activate the plugin. A new Listings menu appears in the admin sidebar.

  3. 3

    Go to Listings > Settings > General and configure:

    • Directory Title: The name of your directory (e.g., "Austin Restaurant Guide")
    • Listings Per Page: How many listings to show per page (12 is a good default)
    • Listing Slug: The URL slug for single listings. A slug is the URL-friendly version of a name — it uses lowercase letters, numbers, and hyphens (e.g., a slug of listing gives you yoursite.com/listing/joes-pizza)
  4. 4

    Save your settings and visit Settings > Permalinks in WordPress. WordPress permalinks control how your page URLs look — "Post name" gives you clean URLs like yoursite.com/my-page/ instead of yoursite.com/?p=123. Simply click Save Changes (even without changing anything) to flush the rewrite rules.

Tip: For detailed installation instructions including server requirements and troubleshooting, see the Getting Started guide.

3. Creating Pages

Your directory needs several WordPress pages, each powered by a shortcode. Create them all now so you can link them together in your navigation menu.

Page Shortcode Purpose
Directory [local-directory] Main directory page with map, search, and listings
Submit Listing [ld-submit-listing] Frontend form for users to submit new listings
My Dashboard [ld-dashboard] Dashboard for listing owners to manage their listings
Search Results [ld-search] Dedicated search results page
Categories [ld-categories] Displays all categories in a grid layout
Locations [ld-locations] Shows all locations in a browseable list
Compare [ld-compare] Side-by-side listing comparison page

Step-by-step page creation

  1. 1

    Go to Pages > Add New in WordPress.

  2. 2

    Give the page a title (e.g., "Directory") and add the shortcode in the page content. You can use a Shortcode block in Gutenberg or simply paste the shortcode text:

    [local-directory]
  3. 3

    Publish the page. Repeat for each page in the table above.

  4. 4

    Go to Listings > Settings > Pages and assign each page to its corresponding role (Directory Page, Submit Page, Dashboard Page, etc.).

  5. 5

    Add the pages to your WordPress navigation menu: go to Appearance > Menus (or use the Full Site Editor if using a block theme) and add at least the Directory, Categories, and Submit Listing pages.

Tip: If you prefer Gutenberg blocks over shortcodes, Local Directory includes blocks for every shortcode. In the block editor, search for "Local Directory" to find them. See the Shortcodes Reference for all available attributes.

4. Setting Up Categories

Categories are the backbone of your directory. They help visitors browse and filter listings by type.

  1. 1

    Go to Listings > Categories in the WordPress admin.

  2. 2

    Create your top-level categories first. Enter the name (e.g., "Restaurants"), a URL slug (e.g., restaurants), and an optional description. Click Add New Category.

  3. 3

    Add subcategories by selecting a parent category from the "Parent Category" dropdown. For example, create "Italian" with parent "Restaurants".

  4. 4

    Set category icons. Click on a category to edit it, then choose a dashicon or upload a custom icon image. Icons appear in the category grid and listing cards.

  5. 5

    Set up rating criteria per category. Go to Listings > Rating Criteria and create criteria specific to each category. For example, for Restaurants you might add "Food Quality", "Service", "Ambiance", and "Value for Money". These criteria appear when visitors leave reviews.

Tip: Aim for 5-8 top-level categories. Too few and the directory feels thin; too many and visitors get overwhelmed. You can always add more categories as your directory grows.

5. Setting Up Locations

Locations let visitors filter listings by geographic area. The hierarchy you planned in Step 1 gets built here.

  1. 1

    Go to Listings > Locations in the WordPress admin.

  2. 2

    Create top-level locations (e.g., "New York" or "United States" depending on your hierarchy). Enter the name, slug, and optional description.

  3. 3

    Add child locations under each parent. For a city directory, you might create neighborhoods: "Manhattan", "Brooklyn", "Queens" under "New York".

  4. 4

    Configure the location hierarchy depth in Listings > Settings > Locations. Set how many levels deep your location tree goes (e.g., 2 levels for City > Neighborhood).

Tip: For a city-focused directory, use neighborhoods as your locations. Visitors searching for "restaurants in SoHo" will thank you. For a country-wide directory, use Country > State > City for maximum flexibility.

6. Configuring Maps

The interactive map is one of the most powerful features of your directory. Local Directory supports two map providers.

Provider API Key Cost Best For
Leaflet (OpenStreetMap) Not required Free Getting started quickly, budget-friendly
Google Maps Required Free tier, then pay-as-you-go Street View, advanced Places features
  1. 1

    Go to Listings > Settings > Maps.

  2. 2

    Choose your map provider. Leaflet works immediately with no configuration. If you select Google Maps, you will need to enter your API key (get one from the Google Cloud Console).

  3. 3

    Set the default center coordinates — the point where the map centers when the page first loads. Enter the latitude and longitude of your directory's main city or region.

  4. 4

    Set the default zoom level. A zoom of 12-13 works well for a city, 6-8 for a state, and 4-5 for a country.

  5. 5

    Configure optional features:

    • Marker clustering: Groups nearby markers at lower zoom levels (recommended for directories with 50+ listings)
    • Viewport search: Automatically filters listings as the user pans/zooms the map
    • Map style: Choose from default or custom map styles

Tip: Start with Leaflet to get your directory up and running quickly. You can switch to Google Maps later without losing any data — it is just a setting change. See the Settings Reference for all map options.

7. Adding Your First Listings

A directory needs listings to be useful. Aim for at least 15-20 listings before going live so the directory feels "alive" and visitors find value immediately.

Option A: Add Manually via Admin

  1. 1

    Go to Listings > Add New in the WordPress admin.

  2. 2

    Fill in the basics: Title (business name), description (a paragraph about the business), and select a category and location from the sidebar taxonomies. In WordPress, taxonomies are ways to group content — categories, locations, and tags are all taxonomies, like labels or folders for organizing your listings.

  3. 3

    Add an address. In the Location Data meta box, enter the street address. The coordinates (latitude/longitude) are auto-detected from the address if geocoding is enabled.

  4. 4

    Set opening hours using the business hours editor. Click each day to set open and close times, or mark it as closed.

  5. 5

    Upload photos. Add a featured image and additional gallery photos. High-quality photos dramatically increase listing engagement.

  6. 6

    Fill in contact details: phone number, email address, website URL. These appear on the listing page and enable the contact form.

  7. 7

    Click Publish. Your listing is now live on the directory.

Option B: Bulk Import from JSON

If you have listings data from Google Maps (saved places export) or another source, you can import them all at once.

  1. 1

    Go to Listings > Import.

  2. 2

    Drag and drop your JSON file onto the upload area, or click to select the file.

  3. 3

    Map the JSON fields to listing fields, review the preview, and click Import.

  4. 4

    Photos, ratings, business hours, and addresses are imported automatically. Optionally enable AI-generated descriptions during import.

Tip: The import tool handles deduplication, so you can safely re-import updated data without creating duplicate listings. For the full import walkthrough, see the Import Guide.

Search is built into the [local-directory] shortcode and works automatically. You can customize which filters appear and how they behave.

  1. 1

    Go to Listings > Settings > Search.

  2. 2

    Enable or disable search filters. Available filters include:

    • Keyword search — full-text search across title and description
    • Category filter — dropdown or checkbox filter by category
    • Location filter — dropdown filter by location taxonomy
    • Radius search — "near me" search with configurable distance
    • Price range — slider for price-based filtering
    • Rating filter — minimum rating threshold
    • Open Now — show only businesses currently open
  3. 3

    Choose the default sort order for search results: newest, alphabetical, distance, rating, or random.

  4. 4

    Save settings. Visit your directory page to test the search form.

Tip: For restaurant or service directories, enable the "Open Now" filter — it is one of the most-used filters by visitors. For real estate directories, the price range slider is essential.

9. Setting Up Monetization

Turn your directory into a business by offering paid listing packages. Business owners pay for premium features like featured placement, more photos, or longer listing duration.

Create Listing Packages

  1. 1

    Go to Listings > Settings > Packages.

  2. 2

    Create a Free package — this is what all new listings get by default. Set it to allow 3-5 photos, basic fields, and no featured placement.

  3. 3

    Create paid packages. For example:

    Basic  — $9/month  — 10 photos, business hours, website link
    Pro    — $29/month — 20 photos, featured badge, priority in search
    Premium — $49/month — Unlimited photos, featured + verified badges, analytics
  4. 4

    Configure what each package includes: number of photos, listing duration (30 days, 90 days, unlimited), featured listing, and which custom fields are visible.

Connect Stripe Payments

Stripe is an online payment processor — like PayPal but designed for websites. You will need a free Stripe account (sign up at stripe.com) to accept payments.

  1. 1

    Go to Listings > Settings > Payments.

  2. 2

    Enable Stripe and enter your Publishable Key and Secret Key from the Stripe Dashboard.

  3. 3

    Start with test mode. Use Stripe's test API keys first to verify the payment flow works correctly. Use the test card number 4242 4242 4242 4242 with any future expiry date and any CVC.

  4. 4

    Test the full flow: submit a listing from the frontend, select a paid package, complete the Stripe checkout, and verify the listing is published.

  5. 5

    Once everything works, switch to your live Stripe API keys to accept real payments.

Tip: Start with a generous free package to attract initial listings and build content. Once you have traffic and proven value, introduce paid tiers. Many successful directories start monetizing once they have 100+ listings.

10. Enabling Business Features

Local Directory includes several features that make your directory more useful for both visitors and business owners.

Claim Listing

Let business owners claim their listing to manage it directly. Go to Listings > Settings > Features and enable the claim system. Once enabled, unclaimed listings show a "Claim this listing" button. Business owners submit a claim request, and you approve or deny it from the admin.

Reviews & Ratings

Reviews are enabled by default on all listings. Visitors can leave star ratings based on the rating criteria you defined per category. Listing owners can reply to reviews. You can moderate reviews from the WordPress admin under Comments.

Contact Form

Every listing with an email address automatically gets a contact form. Visitors can send a message to the business owner directly from the listing page. Enable reCAPTCHA in Settings > Features to prevent spam.

Favorites

Visitors can save listings to a personal favorites list by clicking the heart icon. This works for both logged-in users and guests (stored in the browser). Favorites encourage return visits.

Badges

Assign badges to highlight special listings. Built-in badges include Featured (boosted visibility) and Verified (confirmed by directory admin). Edit any listing and set its badges from the listing editor sidebar.

Analytics

Listing analytics are enabled by default. Each listing tracks page views, search appearances, phone number clicks, website clicks, and map views. Listing owners can see their stats on the frontend dashboard.

11. Customizing the Design

Local Directory uses CSS custom properties (variables) for easy theming and supports full template overrides for advanced customization.

Quick Color Customization

Override the default colors by adding CSS custom properties to your theme's stylesheet or the WordPress Customizer's "Additional CSS":

:root {
  --ld-primary: #4f46e5;      /* Primary brand color */
  --ld-primary-hover: #4338ca; /* Primary hover state */
  --ld-accent: #f59e0b;        /* Accent / highlight color */
  --ld-text: #334155;          /* Default text color */
  --ld-radius: 0.5rem;         /* Border radius */
}

What Is a Child Theme?

A child theme is a small theme that inherits everything from a parent theme (like Kadence) but lets you make changes safely. Without a child theme, any customizations you make would be overwritten when the parent theme updates.

A child theme only needs two files. Here's how to create one:

1

Create a new folder in wp-content/themes/. The name can be anything — for example, kadence-child.

2

Create a style.css file inside it. The Template: line tells WordPress which parent theme to use — it must match the parent's folder name exactly:

/*
Theme Name: My Directory Theme
Template: kadence
*/

/* Your custom CSS goes here */
3

Create a functions.php file to load the parent theme's styles:

<?php
add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
});
4

Go to Appearance → Themes in WordPress admin and activate your child theme. It will look identical to the parent but now you can customize safely.

Shortcut: Many themes (including Kadence) offer a one-click child theme generator in their settings. Some hosting providers also create one automatically. Check before building one manually.

Template Overrides

Once you have a child theme, you can customize how listings look by overriding the plugin's template files. The plugin checks your child theme first and falls back to its own defaults:

wp-content/themes/
├── kadence/                        ← Parent theme (don't edit)
└── kadence-child/                  ← Your child theme
    ├── style.css                   ← Required (with Template: kadence)
    ├── functions.php               ← Required (loads parent styles)
    └── local-directory/            ← Plugin template overrides
        └── listing-card.php        ← Your custom listing card

To override a template: find the original in wp-content/plugins/local-directory/templates/, copy it to your-child-theme/local-directory/ (same filename), and edit the copy. Your changes take effect immediately.

Tip: Use a minimal, performance-focused theme like Kadence, GeneratePress, or Astra for best results. These themes stay out of the way and let the plugin's styles shine. See the Templates & Styling guide for the full list of 44 overridable templates and 40+ CSS variables.

12. SEO Setup

Local Directory generates rich structured data automatically, giving your listings the best chance of appearing in Google's enhanced search results.

Schema.org JSON-LD — Schema.org structured data is a special code format that helps Google understand your content. When Google reads this data, it can show rich results — like star ratings, business hours, and address info — directly in search results. Every listing automatically outputs LocalBusiness structured data including name, address, coordinates, phone, opening hours, ratings, and photos. No configuration needed.

Open Graph tags — Open Graph tags control how your listings appear when shared on social media. They tell Facebook, Twitter, and LinkedIn which title, description, and image to display in the link preview. Each listing page includes these tags automatically.

Custom SEO fields — Override the auto-generated SEO title and meta description on any individual listing for maximum control.

Recommended additional steps

  1. 1

    Install an SEO plugin like Yoast SEO or Rank Math. These handle XML sitemaps (a file that lists all your pages so search engines can find and index them), canonical URLs, and breadcrumbs. Local Directory is fully compatible with both.

  2. 2

    Submit your sitemap to Google Search Console. Your SEO plugin will generate a sitemap at yoursite.com/sitemap_index.xml that includes all your listings.

  3. 3

    Set your permalink structure to "Post name" in Settings > Permalinks for clean, SEO-friendly URLs like yoursite.com/listing/joes-pizza.

Tip: Each listing gets its own structured data, which means each listing is a candidate for Google's rich results (star ratings, business hours, address in search results). The more complete your listing data, the more likely Google is to show rich snippets.

13. Going Live Checklist

Before you announce your directory to the world, run through this checklist to make sure everything is working correctly.

All pages created and linked in the navigation menu (Directory, Submit, Dashboard, Categories)
Categories and locations set up with icons and descriptions
Map provider configured and displaying markers correctly
At least 15-20 listings added (the directory should feel "full")
Search filters tested — keyword search, category filter, and location filter all return correct results
Contact form tested with reCAPTCHA enabled to prevent spam
Mobile layout tested on a real phone — listing cards, map, search form all usable
Payment flow tested end-to-end with Stripe test cards (if monetizing)
Email notifications configured (Settings > Emails) — new listing, claim request, contact form
Permalink structure set to "Post name" (Settings > Permalinks)
Caching plugin installed for performance (WP Super Cache, LiteSpeed Cache, or similar). A caching plugin saves pre-built versions of your pages so they load faster for visitors
SSL certificate active (your site loads over https://). SSL encrypts the connection between your site and visitors — most hosting providers include it for free
Frontend listing submission tested — submit a test listing as a non-admin user

You are ready to launch. Share your directory URL on social media, reach out to local businesses to list themselves, and consider writing blog posts about your niche to drive organic traffic. Congratulations on building your directory!

What's Next

Explore the rest of the documentation to get the most out of Local Directory: