What is an Online Directory and why is it important in 2023
A directory website is an online platform that serves as a comprehensive and organized repository of information about businesses, services, or products within a specific industry or niche.
By providing users with a convenient and centralized source of information, directory websites help them make informed decisions when searching for products, services, or businesses that cater to their needs.
In the digital age, where consumers rely heavily on the internet to find solutions and gather information, directory websites play a critical role in connecting businesses with their target audience.
These websites not only make it easier for users to discover and compare offerings from various businesses but also help businesses increase their online visibility, generate leads, and improve their credibility.
With the ever-growing competition in the online space, having a well-designed and user-friendly directory website is essential for standing out and providing value to both users and businesses.
Using WordPress Custom Post Types, and Advanced Custom Fields in creating directory websites
If you ask WordPress-centered Facebook Groups and Subreddits what the best way to build a directory website is, the majority will answer to avoid built-for-purpose plugins and build it with CPT UI (Custom Post Type) and ACF (Advanced Custom Fields).
These are very capable plugins used by millions of users, however, when it comes to developing a directory website using WordPress, Custom Post Types, and the Advanced Custom Fields, the process can be challenging, frustrating, and with a lot of hidden costs.
These tools, while popular and widely used, often require a steep learning curve for developers in order to achieve complexity and can result in suboptimal performance and limited options.
Let me show you why.
15 Challenges in Achieving Desired Features with Custom Post Types and ACF When Building a Directory Website:
- Create a Front-End Submit Listing Form for Adding and Editing Listings with payments and listing expiration.
while with ACF you can easily create a form on the front end of your website to add or edit content, make it accept payments, offer extra features for paid listings vs free listings, allow for subscriptions (recurring payments), and so on will be a lot harder to accomplish.
If you are a hardcore developer who prefers to create DIY solutions, the only way would be to custom-code all extra features.
This would result in weeks of work (months if it is the first time taking on a similar task).
Otherwise, this can be accomplished by adding extra paid plugins.
For example, the pro version of the Frontend Admin plugin would provide front-end user registration, paid listing submission, and editing.
For a single site, this plugin would add $90/year to your budget.
- Distinguishing Premium Listings from Free Listings
If you want to sell premium listings, while having also free listings, you must differentiate the two and add value to the paid option.
The best option you have is to create a “submit listing” form for each listing type and add extra features to the premium listings in the form of extra custom fields.
For example, the free listing could have only the listing Name, Address, Phone number, and 1 picture.
While the premium listings would have more details like a web address, social media accounts, more pictures, a longer text description, a contact form, and so on.
In addition, the premium listings should be visually different, for example showing a “FEATURED” badge, or a different layout.
This is not particularly difficult to accomplish, still, it is relatively time-consuming.
What is not as easy, would be providing extra visibility to the Premium Listings as opposed to the free listings.
For example, making premium listings always rank on top of category archive pages.
For that, you need to master WP queries and or SQL.
- Managing Listing Subscriptions, Failed Recurring Payments, and Listings Expirations
What do you do If a listing owner doesn’t renew a listing by paying again?
Or in the case where you set up a subscription with a recurring payment, and the listing owner cancels the subscription, or his payment method is declined?
You definitely don’t want the listing to remain active or to get the perks of a premium listing without paying, right?
You must set up a system to either downgrade the listing or make it expire and change its status to unpublished.
All this will require custom code and to develop something like that, you need good knowledge of payment gateways APIs, and especially IPNs (instant payment notifications).
You also need to know how to set up a CRON job, how to alter post statuses, and how to turn a premium listing into a free listing, possibly without losing the extra data.
- Developing a Map with Multiple Pins.
Plotting locations on a Google Map using Advanced Custom Fields and a little javascript, is relatively easy.
The first step is to GeoCode the addresses of each listing, and we will talk more about that in point 6 of this list.
What is not easy is plotting a lot of locations. Especially if you are passing more than just a listing title to the map to show on the Map Markers when clicked.
If you start trying to show more than a few hundred listings on a map (less if the server isn’t top-notch), the map will load extremely slowly or even freeze.
The only solution is to asynchronously load the locations and also the information (AJAX).
Doing that is a lot harder than putting up a map with a few markers, and will take a lot more time to accomplish even for a seasoned developer.
The more listings you have the more complex your solution needs to be.
First, you will hit the maximum AJAX response size of the browser, then you need to load details of single listings via AJAX, then you will need clustering and even server-side clustering which can show millions of listings.
Building a system that gathers the Map Markers in clusters for a high amount of listings becomes imperative when dealing with a vast number of listings.
Hitting these limits on a live site, because your site got some publicity is not something you want or can fix overnight
Building this kind of system comes with another huge set of challenges.
Achieving that requires a lot of coding experience.
- Integrating a Dynamic Contact Form to the Listings
Integrating a unique contact form for each listing, which allows website visitors to contact the business owner directly, can present several challenges.
The complexity of dynamic form generation, data management, customization and consistency, spam prevention, compatibility issues, performance concerns, and ongoing maintenance and updates.
Despite these difficulties, implementing this feature can greatly enhance the website’s functionality and improve communication between visitors and business owners.
There is no plugin available that provides this functionality out of the box.
Significant custom coding is required to implement such a feature in a WordPress directory built using Custom Post Types and Advanced Custom Fields.
- GeoCoding listings and Searching by Proximity
To create a search by proximity feature, you first need to GeoCode the address of each listing.
GeoCoding means getting the longitude and latitude coordinates from the address.
This can be done through the Google Maps GeoCoding API, there are several tutorials online and it’s not a very complex task, however, it takes time.
There is a plugin that can help get started, but it’s not been updated in over 4 years: https://wordpress.org/plugins/address-geocoder/
Once you have all your listings GeoCoded, you have what you need to search by proximity, but achieving that feature requires good WP-Query/SQL knowledge and custom code.
Another option would be to use FacetWP, a premium search plugin that starts at $99/year for 1 to 3 websites.
- GeoLocating Users and Displaying Nearby Listings
This can be done automatically (you’ll need Trusted IP Geolocation Data).
Or, by using the Google GeoLocation API, by asking users to share their browser location.
The first option is more user-friendly but less precise. The IP address rarely returns a 100% correct address.
The second option will return the user’s location with much higher precision but only works with the user’s authorization.
Both options will require custom coding as there is no plugin that will automate all this.
In addition, having the user’s location is just the starting point.
You still need to query the database and return the listings which are closer to the user location.
- Automating Listing Claims for Business Owners
One of the easier ways to engage with business owners and get them to pay a premium listing is to add their business to your directory as a free listing and let them claim it.
You can then either contact them directly and let them know about the opportunity, possibly with a free trial.
Or, the other option, which normally tends to have the best outcome, is that they discover their listing on your directory, by themselves.
This way you are showing them on the spot that you know how to give visibility to your website and become right away, 10x more attractive to them.
For the second option to be possible, you need to have a Claim Listing system in place.
A claim listing system is a feature implemented in directory websites that allows business owners to take ownership of their business listing on the platform.
This system is designed to ensure that the information displayed on the directory website is accurate, up-to-date, and managed by the authorized business owner or representative.
To claim a listing, business owners must follow a verification process set by the directory website, which may involve providing proof of identity or business ownership, such as a business license, tax identification number, or utility bill.
Once the claim is approved, the business owner gains control over the listing and can update the information, add photos, respond to reviews, or promote their business using premium features offered by the directory website.
For a tiny directory with a few listings, you may set this up with a contact form and a manual process.
If you wish to add some automation, a lot of custom coding need to go into this feature. Especially if you want business owners to pay to upgrade their listing as part of the claim process.
There is no plugin that will do this out of the box for Directories built with CPT and ACF.
- Showing Business Hours and Search Filtering by Availability
with the Advanced Custom Fields plugin, you can create repeater fields for the opening hours of each listing.
You’ll need to create a dropdown field with the hour values and then use PHP to format it properly for display or calculations.
If you want minute-specific time, you’ll need to use a number field.
Searching by “Open now” or “Closed now”, especially if you have to take into consideration Timezones for the calculation, is only possible with custom queries and code.
Another big challenge is caching this information without disrupting the open/closed status of the listings.
This requires JavaScript skills to have the Open /Closed change live on the page.
It goes without saying that there is no ready-made plugin that will help you accomplish this feature for a CPT and ACF listing.
- Adding Ratings, Reviews, and Sorting Listings by Top Rated
Adding ratings and reviews to a custom post type, using the comments system is relatively easy.
There are free and premium plugins that will help you do that, and you may even find tutorials on how to achieve it without a plugin.
Sorting listings by popularity or top ratings is a bit more complex and will require some custom code and knowledge of the WP_Query class and possibly SQL.
Also, when working on this, you soon realize a simple best rating ordering is a poor ranking factor and it requires more complex ranking queries.
Especially if you decide to build custom database tables because, with all these fields, you will quickly notice that ACF is not scalable at all.
But more on this in the next point.
- Searching Listings by Custom Fields or Location
This is where this approach will fail miserably at scale.
The wp_postmeta database table (custom fields) isn’t designed for querying posts by custom fields.
Filtering by anything more than 1 custom field can result in an exponential increase in query times and even a small directory would struggle with filtering more than two custom fields.
For those looking for a technical explanation, you can read this post about ACF scalability limits.
Unless you are dealing with a few hundred listings with a low number of custom fields each, even when using a fantastic search plugin like FacetWP, you will hit a wall quite quickly.
The better your server, the longer it will take you to hit that wall, but eventually, you’ll get there.
There are plugins that save ACF data in custom database tables like: https://hookturn.io/downloads/acf-custom-database-tables/, but it is an extra cost and you will need to write a custom query for your search form to search into the new database tables.
- Implementing Free and Paid Trials for Business Owners
Offering trial options for easier onboarding is an effective way to encourage business owners to explore the features and benefits of a directory website.
By providing free or discounted access to premium features, business owners can experience the value of the platform without making an immediate financial commitment.
This approach helps reduce the barriers to entry and fosters trust between the directory website and potential customers.
As business owners become familiar with the platform and witness its potential to increase their online visibility, generate leads, and improve their reputation, they are more likely to convert from trial users to paying customers.
That said, offering a free or paid trial might not be as simple. If you go the develop-from-scratch route, this will add days if not weeks of custom coding to your project and budget.
- Adding Events and Searching by Date
Events are listings with more statuses than the usual listings, which depend on a start date and end date. Events can be Past, upcoming, or ongoing.
You will need yet another custom post type and more complex search queries.
There are several plugins that will add a full Event Calendar to your website, but the style will be completely different from your listings built with CPT/ACF combo.
If you decide to build this too with CPT/ACF, your development time just doubled.
- Creating a Compare Listings Feature
The benefits of allowing users to compare listings on a directory website are numerous.
By enabling users to easily evaluate different businesses or services side by side, a comparison feature can help them make more informed decisions.
This feature allows users to quickly identify key differences, such as pricing, features, ratings, or proximity, and choose the most suitable option based on their needs and preferences.
Implementing a compare listings feature using custom post types and Advanced Custom Fields can be challenging and time-consuming.
The difficulty stems from the need to create a system that dynamically generates a side-by-side comparison of the chosen listings, taking into account various custom fields and attributes.
Additionally, the comparison interface must be designed to be user-friendly, visually appealing, and responsive to different screen sizes and devices.
The amount of time required to implement a compare listings feature depends on several factors, such as the complexity of the listings, the number of custom fields to be compared, and the developer’s expertise with Custom Post Types and Advanced Custom Fields.
However, it is not uncommon for this process to take several weeks of development and testing to ensure a smooth and functional user experience.
- Adding a Booking System for vacation rentals
This would be a really complex task with CPT and ACF alone. It would require months of custom coding.
There are a few free plugins that will allow us to take bookings for one property, but in this case, we would need to take bookings for several properties, each owned by different people.
We couldn’t find a premium plugin that would allow multivendor bookings, with a global search by dates, custom fields (Swimming Pool, WiFi, parking), and number of people.
GeoDirectory now is the only solution offering a complete booking plugin for vacation rentals, which allows building a complete Airbnb Clone where the Directory Admin can make money through a commission for each booking secured.
Conclusions
While it is indeed possible to build a fully-fledged business directory using Custom Post Types and Advanced Custom Fields, this approach could take months or even years of custom coding to implement all the required features.
An alternative solution is to use ACF-compatible plugins, which can help streamline certain aspects of development.
However, this approach may require installing an array of plugins from different developers, many of which are not free, leading to potential compatibility issues and increased costs.
For example, if you were to use:
- Frontend Admin: $49.99/year
- FactWP: $99/year
- ACF Custom Database Tables: $149/year
You are already at almost $300/year and you only covered a tiny fraction of the features needed.
A more efficient and cost-effective option is to use a dedicated WordPress business directory plugin, such as GeoDirectory.
By choosing this route, you benefit from a suite of features designed specifically for directory websites, all developed by a single developer.
The plugins are typically lightweight, minimizing performance concerns, and offering a more cohesive and superior application tailored to the purpose of building a directory website.
By opting for a solution like GeoDirectory, you save both time and money, enabling you to create a powerful and user-friendly directory website without the challenges and complexities associated with custom coding and managing multiple plugins.