All Purpose Directory
Everything you need to build directory and listing websites with All Purpose Directory and its module ecosystem.
Getting Started
All Purpose Directory is available on WordPress.org. Install it in a few steps:
- In your WordPress admin, go to Plugins → Add New and search for "All Purpose Directory".
- Click Install Now, then Activate.
- Navigate to APD → Settings to configure your first directory.
- Create a new page and add the
[flavor_listings]shortcode to display your listings.
Once active, the plugin registers a listing post type with categories, custom fields, frontend submission, and search out of the box. You can extend it further with any of the APD modules.
All Purpose Directory
Core Concepts
Listings are the core content type. Each listing is a custom post that can hold an unlimited number of custom fields, belong to categories, and move through moderation statuses.
Categories organize listings into groups. Categories support hierarchy, custom icons, and per-category field configurations so different listing types can collect different data.
Fields define the data each listing collects. APD ships with 25+ field types including text, textarea, select, checkbox, radio, number, URL, email, date, file upload, gallery, repeater, and more. Fields are managed through the admin and automatically rendered on the frontend.
Statuses control the listing lifecycle: pending, published, expired, and rejected. Admins configure which statuses require moderation and whether auto-approval is enabled.
Shortcodes
category, per_page, orderby, statusfields, layout, ajaxcategory, fieldslayout, columns, hide_emptyper_pageGutenberg Blocks
APD provides three Gutenberg blocks for the WordPress block editor:
- Listings Grid — Display listings in a configurable grid with visual controls for columns, category filter, and sort order. Mirrors the
[flavor_listings]shortcode with a block UI. - Search Form — Add a search form with drag-and-drop field selection. Preview the form layout directly in the editor.
- Submission Form — Embed a frontend submission form. Choose which fields to include and set the target category from the block sidebar.
Frontend Submission
Allow users to submit listings from the frontend without accessing the WordPress admin:
- Create a new page (e.g., "Submit a Listing").
- Add the
[flavor_submit]shortcode or the Submission Form block. - In APD → Settings → Submission, configure which fields are available, required, and their order.
- Set the moderation mode: Auto-approve publishes immediately; Manual review sets submissions to
pending. - Optionally restrict submission to logged-in users or specific roles.
Submitted listings appear in the WordPress admin under APD → Listings where they can be reviewed, edited, or rejected.
Reviews & Favorites
Enable reviews in APD → Settings → Reviews. Users can rate listings on a 1-5 star scale and leave written reviews. Reviews support moderation — set them to auto-approve or require admin approval before display.
Average ratings display automatically on listing cards and single listing pages. Listings can be sorted by rating in the [flavor_listings] shortcode using orderby="rating".
Favorites let logged-in users save listings for later. Add a favorites page with the [flavor_favorites] shortcode. A heart icon on listing cards toggles the favorite state via AJAX.
Email Notifications
APD sends email notifications for key events. Each notification can be enabled/disabled and its template customized in APD → Settings → Emails:
REST API
APD registers REST API endpoints under the /wp-json/flavor/v1/ namespace. Authenticate with a WordPress nonce (for logged-in users) or an application password.
Example — fetch all published listings:
const response = await fetch( '/wp-json/flavor/v1/listings', {
headers: {
'X-WP-Nonce': wpApiSettings.nonce
}
});
const listings = await response.json();
Template Overrides
Customize the look and feel of APD by overriding its templates in your theme. The plugin uses a template hierarchy similar to WooCommerce:
- Locate the template you want to override in
wp-content/plugins/flavor/templates/. - Copy it to
wp-content/themes/your-theme/flavor/keeping the same directory structure. - Edit your copy. APD will load your theme's version instead of the plugin default.
Available templates include listing-card.php, single-listing.php, search-form.php, submit-form.php, and category-grid.php.
Hooks Reference
APD provides filters and actions for developers to extend and customize behavior.
add_filter( 'flavor_listing_fields', function( $fields, $listing_id ) {
$fields[] = [
'key' => 'custom_field',
'type' => 'text',
'label' => 'My Custom Field',
];
return $fields;
}, 10, 2 );
add_filter( 'flavor_search_query', function( $args ) {
$args['meta_query'][] = [
'key' => 'featured',
'value' => 1,
];
return $args;
});
APD Modules
APD modules extend the core plugin with specialized listing types. Each module registers via the apd_modules_init hook and requires All Purpose Directory 1.0.0+. Install modules alongside the core plugin and activate them individually.
URL Directory
Build a website or link directory with automatic favicon fetching, scheduled link checking, and click tracking.
- Favicon fetching — Automatically retrieves and caches favicons from submitted URLs using Google's favicon service with a local fallback.
- Link checking — A scheduled cron job validates submitted URLs periodically. Broken links are flagged in the admin for review.
- Click tracking — Outbound clicks are tracked via a redirect endpoint. View click counts per listing in the admin.
- Nofollow settings — Control whether outbound links use
rel="nofollow"globally or per category.
Business Directory
Create a local business directory with maps, business hours, and verification.
- Google Maps integration — Add your Google Maps API key in settings. Listings display an interactive map with automatic geocoding from the address field.
- Business hours — A dedicated field type lets business owners set hours for each day of the week with support for "open now" filtering in search.
- Verification — Mark businesses as verified with a badge. Supports manual admin verification or document-based verification workflows.
- Proximity search — Users can search for businesses near their location using geolocation or a typed address with configurable radius.
Classifieds
Add buy/sell/trade classified ad functionality similar to Craigslist or Facebook Marketplace.
- Pricing fields — Currency-formatted price fields with support for "negotiable", "free", and "contact for price" options.
- Item condition — Predefined condition values (new, like new, good, fair, for parts) displayed as badges on listing cards.
- Expiration — Ads expire after a configurable number of days. Sellers are notified before expiration and can renew from their dashboard.
- Seller contact — Contact forms, phone reveal buttons, and "make an offer" forms with spam protection.
Job Board
Build a job board with application tracking, alerts, and company profiles.
- Application tracking — Applicants submit via a built-in form or external URL. Employers review applications with status tracking (new, reviewed, shortlisted, rejected).
- Job alerts — Users subscribe to alerts by category, keyword, or location. Notifications are sent via a daily or weekly digest email.
- Company profiles — Employers get a dedicated company page with logo, description, and a list of their active job postings.
Real Estate
List properties for sale or rent with specialized real estate fields.
- Property fields — Dedicated fields for bedrooms, bathrooms, square footage, lot size, year built, property type, and listing status (for sale, for rent, sold).
- Virtual tours — Embed 360-degree virtual tour links or video walkthroughs directly on the listing page.
- Property comparison — Users can select up to 4 properties and compare them side-by-side in a detailed table view.
FAQ
What versions of WordPress and PHP are supported?
All Purpose Directory requires WordPress 6.0+ and PHP 7.4+. We recommend WordPress 6.4+ and PHP 8.1+ for optimal performance.
Does APD work on WordPress Multisite?
Yes. APD is multisite compatible and can be network-activated or activated per site. Each site maintains its own listings, categories, and settings independently.
Will APD slow down my site?
No. APD uses efficient database queries with proper indexing, lazy-loads assets only on pages where they're needed, and supports object caching (Redis, Memcached). The REST API responses are also cached.
Can I create custom field types?
Yes. Register custom field types using the flavor_field_types filter. Each field type needs a render callback, a save callback, and a search callback. See the Hooks Reference section for examples.
Do APD modules require the core plugin?
Yes. All modules require All Purpose Directory 1.0.0+ to be installed and active. Modules register themselves via the apd_modules_init hook and will deactivate gracefully if the core plugin is missing.
Is APD available in other languages?
APD is fully translatable using standard WordPress internationalization (.pot/.po/.mo files). Community translations are managed through WordPress.org's translate platform.