
Directorist - Custom Badges
A Directorist extension that allows you to create and manage custom badges for your listings with advanced conditions.
Directorist Custom Badges extends the Directorist plugin functionality by providing a comprehensive badge management system. Create custom badges that display on listings based on configurable conditions such as meta fields, pricing plans, and more.
- Custom Badge Creation: Create unlimited custom badges with custom labels, icons, colors, and CSS classes
- Condition-Based Display: Display badges based on:
- Meta field conditions (with various comparison operators)
- Pricing plan conditions (user active plans, listing plans)
- Multiple conditions with AND/OR logic
- Template Integration: Seamlessly integrates with Directorist templates
- Admin Interface: User-friendly admin interface for managing badges
- Import/Export: Import and export badge configurations
- Active/Inactive Toggle: Enable or disable badges without deleting them
- Drag & Drop Reordering: Reorder badges with drag and drop functionality
- WordPress 5.2 or higher
- Directorist plugin (active)
- PHP 7.4 or higher
- Upload the
directorist-custom-badgefolder to/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to Directorist > Custom Badges to start creating badges
- Go to Directorist > Custom Badges in your WordPress admin
- Click Add New Badge
- Fill in the badge details:
- Badge Title
- Badge ID (lowercase with hyphens only)
- Badge Label (display text)
- Icon (optional)
- CSS Class (optional)
- Color (optional)
- Configure conditions (meta fields, pricing plans, etc.)
- Set condition relation (AND/OR)
- Save the badge
Display badges based on custom field values with operators:
=(equals)!=(not equals)>(greater than)>=(greater than or equal)<(less than)<=(less than or equal)LIKE(contains)NOT LIKE(does not contain)IN(in list)NOT IN(not in list)EXISTS(field exists)NOT EXISTS(field does not exist)
Type casting options:
CHAR(string)NUMERIC(numbers)DECIMAL(decimal numbers)DATE(dates)DATETIME(date and time)BOOLEAN(true/false)
- User Active Plan: Check if the listing owner has an active pricing plan
- Listing Has Plan: Check if the listing is assigned to a specific pricing plan
This plugin follows WordPress security best practices:
- All user inputs are sanitized and validated
- Nonce verification for AJAX requests
- Capability checks for admin functions
- Proper data escaping for output
- SQL injection prevention through WordPress APIs
The plugin follows WordPress Coding Standards:
- PSR-2 compatible code structure
- Proper escaping and sanitization
- Consistent naming conventions
- Comprehensive inline documentation
Related Products
Directorist - Advanced Social Links
An extension for Directorist plugin that adds advanced social networking options to listing forms and single listing pages.
Directorist - Custom Badges
A Directorist extension that allows you to create and manage custom badges for your listings with advanced conditions.



