How to create a web directory in WordPress

Looking to build a web directory? Websites like Yelp, Airbnb, and many more are examples of popular and successful web directories. Essentially, web directories are websites that collect and share data about people, events, places, or organizations, often for a fee.

A web directory can be complex and time consuming to code from scratch, but with the advancements in WordPress software functionality, now you can build one easily.

Here are three ways to get the job done:

Method 1: Create a web directory using a custom WordPress directory theme

This is probably the easiest method to create a web directory. You can use a theme that has been custom designed for this, and all you need to do is just upload your data and customize the functionality of the design theme. There are several themes that come highly recommended. Here are the first three:

AnnouncementPro


listingpro-homepage

ListingPro is a WordPress theme that makes it easy to create any type of directory site. It includes a drag and drop page builder as well as a form builder that helps you build custom forms for leads, lists, contact info, etc.

Other features include a built-in ad management tool, an event calendar, and support for over 10 major payment processing systems. With this feature rich theme, you don’t need any additional plugins to build your directory which is a big plus.

List


List

With its impressive collection of features and ease of use, Listify is one of the most popular directory themes out there. The geolocation feature makes it easier for users to find nearby listings, and bookmarks allow users to save specific listings that may be of interest to them.

VIDEO OF THE DAY MAKEUSE

It also offers features like subscriptions, paid access, ads, and bookings that make it easy to monetize your directory which will be an important consideration.

Javo Directory


Javo-directory-1

Javo Directory is a WordPress directory theme based on Visual Composer. Just like ListingPro and Listify, this theme is packed with features. For starters, visitors can interact with the ads on your page by leaving reviews and suggestions.

There is also the option to allow customers to create profiles and rate companies. The theme also has over 100 pre-built templates that you can easily import and customize.

Should you use a custom theme?

If you are looking for a quick and easy solution, using a custom theme to build your web directory is a great option.

Advantages:

  • Using custom themes is generally very easy. Most of the themes are easy to set up and feature drag and drop builders that don’t require any coding knowledge.
  • Most directory themes offer a lot of customization options, giving you great control over the appearance of various items.
  • Most themes offer easy integration with payment systems like PayPal and Stripe.

The inconvenients:

  • If you want to change the theme, it may be difficult to transfer content to the new theme.
  • Directory themes are generally premium themes that you have to pay for.

Creating a web directory using a plugin

If you already have a theme installed on WordPress and prefer not to switch to a directory specific theme, you can simply install a plugin dedicated to creating directories.

These plugins integrate well with most themes and provide the basic functionality to integrate a web directory into any type of website. There are several, but here are some of the best:

Business directory plugin


Business-directory-plugin

Business Directory Plugin is a lightweight, easy-to-use plugin that includes the most essential directory features for free. These include payment processing, customizable form fields, and media support. You also have the option of purchasing add-ons to get any additional features you might need.

Geo-directory


GeoDirectory-plugin-homepage

If you want to build a scalable business directory, GeoDirectory is a great option as it aims to help users build global business directories. That doesn’t mean, however, that you can’t use it for smaller, more targeted directories. The free version gives you an impressive collection of features sufficient for most projects. But you have the option of adding some features by purchasing add-ons if you are looking for more.


Pro Directory


Professional Directory (2)

Directory Pro is a feature-rich plugin that gives you the tools to create unique directories that stand out from the competition. It is very responsive, optimized for speed, and SEO friendly. It is also very easy to use with a drag and drop editor that allows you to make changes without having to write any code.

Should you be using a plugin?

Using a plugin is probably your best bet if you want to keep your directory settings regardless of what theme you use, or if you don’t want to install a custom theme in the first place.

Advantages:

  • The plugins integrate seamlessly with most WordPress themes.
  • These types of plugins provide all the functionality you need to build a directory website without needing to install any other dependencies.
  • They are relatively easy to install and use.


The inconvenients:

  • You will need to install a theme to act as the framework for your website design.
  • You may need to upgrade to the premium version to take advantage of some features.
  • A plugin can bloat and slow down your website.

Creating a web directory with custom post types

While using a custom theme and plugins is relatively simple and straightforward, more experienced coders might prefer to build a web directory by creating custom post types in a WordPress theme.

You may be considering creating a basic business directory, such as a real estate listing site or a directory of law firms in your area. You can do this manually using a combination of plugins like Custom Post Types plugin, Custom Fields plugin, and Elemntor Pro, one of the best WordPress page builders.


A better approach might be to write some code in your WordPress theme. The steps are easy to follow. In our example, we’ll add a custom “list” post type to the default 2021 WordPress theme, but you can use any multipurpose WordPress theme.

Before you start, be sure to create a child theme and save your website.

Read more: How to backup your WordPress site manually with FTP or using plugins

First, in the WordPress backend, go to Appearance> Theme Editor> Theme Functions (functions.php). Copy and paste the following code at the bottom:

/*Custom Post type start*/
function cw_post_type_listing() {

$supports = array(
'title', // post title
'editor', // post content
'author', // post author
'thumbnail', // featured images
'excerpt', // post excerpt
'custom-fields', // custom fields
'comments', // post comments
'revisions', // post revisions
'post-formats', // post formats
);

$labels = array(
'name' => _x('listings', 'plural'),
'singular_name' => _x('listing', 'singular'),
'menu_name' => _x('listings', 'admin menu'),
'name_admin_bar' => _x('listings', 'admin bar'),
'add_new' => _x('Add New', 'add new'),
'add_new_item' => __('Add New listing'),
'new_item' => __('New listing'),
'edit_item' => __('Edit listing'),
'view_item' => __('View listing'),
'all_items' => __('All listings'),
'search_items' => __('Search listings'),
'not_found' => __('No listing found.'),
);

$args = array(
'supports' => $supports,
'labels' => $labels,
'public' => true,
'query_var' => true,
'rewrite' => array('slug' => 'listings'),
'has_archive' => true,
'hierarchical' => false,
);
register_post_type('listing', $args);
}
add_action('init', 'cw_post_type_listing');
/*Custom Post type end*/


This code leverages WordPress-specific PHP which allows you to register a custom post type without having to create it completely from scratch.

Update the file and refresh the page, and your dashboard should have a brand new menu item called “Lists”.

That’s it! To see all your listings, go to yoursitename.com/listings/. If you can’t view the ads or the browser returns a 404 page, just go back to your WordPress dashboard, navigate to settings> permalinks and save the permalink settings again. The archive page for your ads should now be visible.

Build your web directory

Creating a web directory can be a smart way to start and run an online business. As we have shown, there are several methods that you can use and many options that you can choose from to perform each of these methods. Take advantage of these possibilities and start building your web directory today.


You can also consider taking on the challenge of building your business directory website from scratch. If you have coding skills, this could be a good idea that allows you to maintain control over the look and functionality of your website.


simple-php-site
How To Build Your First Simple PHP Website

Want to build a website but don’t know where to start? Building a basic PHP website will put you on the path to web development.

Read more


About the Author

Comments are closed.