MyListing Explore Page Filters Addon
The {CODICTS} MyListing Explore Page Filters Addon plugin extends MyListing’s explore page search system with five custom filter types not available in the base theme:
Bookmarks Filter — lets logged-in users filter to show only their bookmarked listings.
Owned Filter — lets logged-in users filter to show only listings they have created.
Following Filter — lets logged-in users filter to show listings related to the listings they follow (requires MyListing’s Listing Followers extension).
Related Listing Filter — filters to show only child listings related to a specific parent listing via MyListing’s relations system.
Better Range Filter — an enhanced range slider with editable input fields, prefix/suffix support, value formatting, and both single-slider and dual-slider (range) modes.
The plugin also automatically maintains a bookmark count on each listing, enabling a “Most Bookmarked” sort order option.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
On activation, the plugin automatically copies its filter templates to your child theme, populates bookmark counts for existing listings, and registers the five custom filter types with MyListing. There is no settings page — all configuration is done within the Listing Type Editor under the Search Forms tab.
Key Features
| Feature | Description |
|---|---|
| Bookmarks Filter | Filter the explore page to show only the current user’s bookmarked listings. |
| Owned Listings Filter | Filter the explore page to show only listings created by the current user. |
| Following Filter | Filter to show related listings of followed listings (requires Listing Followers extension). |
| Related Listing Filter | Filter by child listings related to a specific parent listing via MyListing’s relations table. |
| Better Range Filter | Enhanced range slider with editable text inputs, prefix/suffix, value formatting, and single or range modes. |
| Bookmark Sorting | Automatically maintains a bookmark count meta key, enabling “Most Bookmarked” sort order in search forms. |
| Editable Labels | Custom button labels for filtered and unfiltered states on all toggle filters. |
| RTL Support | Right-to-left language layout support for the Better Range filter. |
| Translation Ready | Fully translatable with included .pot file. |
Available Filters
After activation, the filters appear in the MyListing Listing Type Editor under the Search Forms tab, prefixed with {C}:
| Filter | Purpose | Who Can See It |
|---|---|---|
| {C} Bookmarks Filter | Shows only the user’s bookmarked listings. | Logged-in users only |
| {C} Listing Owned Filter | Shows only listings the user has created. | Logged-in users only |
| {C} Following Filter | Shows related listings of followed listings. | Logged-in users only (requires Listing Followers extension) |
| {C} Related Listing Filter | Shows child listings related to a parent listing. | All users |
| {C} Better Range Filter | Enhanced range slider with editable inputs, prefix/suffix, and formatting. | All users |
Adding Filters to a Listing Type
1. Navigate to Listing Types in the WordPress admin.
2. Edit the desired listing type.
3. Go to the Search Forms tab.
4. In the available filters list, find the CoDicts filters prefixed with {C}.
5. Drag the desired filter into the search form’s filter list.
6. Configure the filter options (see below).
7. Save the listing type.
Configuring the Bookmarks Filter
The Bookmarks filter lets logged-in users toggle the explore page to show only their bookmarked listings. It appears as a toggle button or dropdown on the explore page.
| Option | Description |
|---|---|
| Label | The display label shown above the filter on the explore page. |
| Unfiltered label | Text shown on the “All” (unfiltered) button (default: “All”). |
| Filtered label | Text shown on the active/filtered button (default: “Bookmarked”). |
Note: This filter is completely hidden for non-logged-in visitors. Only logged-in users see the filter UI.
Configuring the Owned Filter
The Owned filter lets logged-in users toggle the explore page to show only their own published listings.
| Option | Description |
|---|---|
| Label | The display label shown above the filter on the explore page. |
| Unfiltered label | Text shown on the “All” button (default: “All”). |
| Filtered label | Text shown on the active button (default: “Owned”). |
Note: This filter is completely hidden for non-logged-in visitors.
Configuring the Following Filter
The Following filter lets logged-in users see listings related to the listings they follow. It works by finding the user’s followed listings, then showing the child listings related to them via MyListing’s relations system.
| Option | Description |
|---|---|
| Label | The display label shown above the filter on the explore page. |
| Unfiltered label | Text shown on the “All” button (default: “All”). |
| Filtered label | Text shown on the active button (default: “Following”). |
Important: This filter requires the MyListing Listing Followers extension to be active. If the extension is not installed, this filter will not appear in the listing type editor.
Configuring the Related Listing Filter
The Related Listing filter shows child listings that are related to a specific parent listing via MyListing’s relations table. It is designed to be used on pages where a single listing is displayed alongside an explore widget — the filter automatically reads the current listing’s ID to find its child listings.
| Option | Description |
|---|---|
| Label | The display label shown above the filter on the explore page. |
| Unfiltered label | Text shown on the “All” button (default: “All”). |
| Filtered label | Text shown on the active button (default: “Related Listings”). |
Note: This filter requires a parent listing context. It works on pages where a single listing is displayed alongside an explore widget. On standalone explore pages without a listing context, the filter will have no parent ID to query against.
Configuring the Better Range Filter
The Better Range filter provides an enhanced range slider with editable text input fields. Users can drag the slider handles or type values directly into the input fields. It supports prefix/suffix text (e.g., “$” or “sqft”), value formatting with locale separators, and both single-slider and dual-slider modes.
| Option | Description |
|---|---|
| Label | The display label shown above the filter on the explore page. |
| Source field | The number field from the listing type whose values will be used for the range. Only number-type fields are available. |
| Type | Range slider (dual handles for min/max range) or Single slider (single handle for a threshold value). |
| Behavior | (Single slider only) Lower = matches listings with values ≤ the slider value. Upper = matches listings with values ≥ the slider value. |
| Step size | The increment step for the slider (e.g., 1, 5, 100). |
| Prefix | Text displayed before the value (e.g., $, €). |
| Suffix | Text displayed after the value (e.g., km, sqft). |
| Format the numeric value | When enabled, formats numbers with locale separators (e.g., 12500 → 12,500). |
The slider’s min and max values are automatically calculated from the published listing data for the selected source field.
Sorting by Most Bookmarked
The plugin automatically maintains a bookmark count on each listing. To let users sort by most bookmarked:
1. Navigate to Listing Types → edit your listing type.
2. Go to the Search Forms tab.
3. Under Listing Order, add a new sort option.
4. Set the order to sort by Raw field.
5. Enter _codicts_total_bookmarks as the field key.
6. Set the Data type to Numeric.
7. Set the order direction to Descending (highest first).
8. Save the listing type.
The bookmark count is maintained automatically — it updates in real time whenever a listing is bookmarked or unbookmarked. When you first activate the plugin, it also populates the count for all existing bookmarked listings.
Example Setup
1. Activate the plugin with the MyListing theme and a child theme active. Templates are automatically copied.
2. Go to Listing Types and edit a listing type (e.g., “Properties”).
3. Open the Search Forms tab.
4. Drag the {C} Bookmarks Filter into the search form. Set the filtered label to “My Favorites.”
5. Drag the {C} Listing Owned Filter into the search form. Keep the default “Owned” label.
6. Drag the {C} Better Range Filter into the search form. Select a “Price” number field as the source, set the type to “Range slider,” add $ as the prefix, set step to 1000, and enable “Format the numeric value.”
7. Under Listing Order, add a sort option using raw field _codicts_total_bookmarks with numeric data type and descending order. Label it “Most Bookmarked.”
8. Save the listing type.
9. Visit the explore page as a logged-in user. The Bookmarks toggle shows “My Favorites” — clicking it filters to only your bookmarked listings. The Owned toggle shows only your own listings. The Better Range slider lets you filter by price range with formatted “$” values and editable inputs. The sort dropdown includes “Most Bookmarked” to order by popularity.
Frequently Asked Questions
Does this require a child theme?
Yes. The plugin copies filter template files into the child theme directory. Without a child theme, the templates cannot be installed and the filters will not render.
Is there a settings page?
No. All configuration is done within the MyListing Listing Type Editor under the Search Forms tab.
Where do the filters appear after activation?
In the listing type editor’s Search Forms tab. Look for filters prefixed with {C}: Bookmarks Filter, Listing Owned Filter, Following Filter, Related Listing Filter, and Better Range Filter.
Why don’t I see the Following filter?
The Following filter requires MyListing’s Listing Followers extension to be active. If the extension is not installed, this filter will not appear.
Can non-logged-in users use the Bookmarks, Owned, or Following filters?
No. These three filters are completely hidden for non-logged-in visitors — both the UI and the query logic require an authenticated user. The Related Listing and Better Range filters work for all users.
How does the bookmark sorting work?
The plugin maintains a _codicts_total_bookmarks meta key on each listing that tracks the total number of bookmarks. You can add a sort option in your listing type’s search form that orders by this field. The count updates automatically whenever listings are bookmarked or unbookmarked.
Does the Better Range filter support decimal values?
Yes. The filter uses decimal-precision queries, supporting accurate numeric comparisons for both whole numbers and decimal values.
Can I have multiple Better Range filters on the same listing type?
Yes. Each filter instance gets a unique identifier, and the shared styles are only loaded once per page.
What happens when I deactivate the plugin?
All cloned template files are removed from the child theme and the filters stop appearing. The bookmark count data is preserved in the database. Reactivating the plugin re-copies the templates and restores full functionality.
Will my template customizations be preserved on update?
No. Plugin updates overwrite all template files in the child theme to ensure compatibility. Apply customizations via WordPress hooks instead of editing the template files directly.
Troubleshooting
Filters Not Appearing in the Listing Type Editor
| Cause | Solution |
|---|---|
| Templates not installed | Deactivate and reactivate the plugin to trigger template installation. Ensure both the MyListing theme and a child theme are active. |
| Plugin not activated | Go to Plugins → Installed Plugins and verify the plugin is active. |
| MyListing or child theme not active | Both the MyListing theme and a child theme must be active. Check Appearance → Themes. |
Filter Added But Not Showing on Explore Page
| Cause | Solution |
|---|---|
| User not logged in (toggle filters) | The Bookmarks, Owned, and Following filters are hidden for non-logged-in visitors. Log in to see them. |
| Template files missing from child theme | Deactivate and reactivate the plugin to re-copy the templates. |
| Filter not saved to listing type | Make sure you saved the listing type after adding the filter in the Search Forms tab. |
Bookmarks Filter Returns No Results
| Cause | Solution |
|---|---|
| No bookmarked listings | The user must have bookmarked at least one listing of this listing type. If no bookmarks exist, the filter returns no results. |
| Bookmarked listings not published | Only published listings appear in results. Draft, pending, or expired bookmarked listings will not show. |
Owned Filter Returns No Results
| Cause | Solution |
|---|---|
| No owned listings | The user must have created and published at least one listing of this listing type. |
Following Filter Not Available
| Cause | Solution |
|---|---|
| Listing Followers extension not active | This filter requires MyListing’s Listing Followers extension. Install and activate it, then deactivate and reactivate this plugin. |
Related Listing Filter Returns No Results
| Cause | Solution |
|---|---|
| No parent listing context | This filter is designed for pages where a single listing is displayed alongside an explore widget. On standalone explore pages, there is no parent listing to query against. |
| No related child listings | The parent listing must have child listings connected via MyListing’s relations system. |
Better Range Slider Not Working
| Cause | Solution |
|---|---|
| No source field selected | Edit the filter in the listing type editor and ensure a number field is selected as the source field. |
| No listing data | The slider’s min and max are calculated from published listing data. If no listings have values for the source field, the slider may not function correctly. |
| Wrong field type | Only number-type fields are supported as the data source. Ensure the selected field is a number field. |
“Most Bookmarked” Sort Not Working
| Cause | Solution |
|---|---|
| Sort option not configured | Add a sort option in the listing type’s Search Forms tab using raw field _codicts_total_bookmarks with data type Numeric and descending order. |
| No bookmark data | Listings must have been bookmarked at least once. The plugin populates counts for existing bookmarks on activation and updates them in real time going forward. |
Template Overwrite Warning
The following template files in your child theme are managed by this plugin and will be overwritten on activation and updates:
includes/src/listing-types/filters/bookmarks.php
includes/src/listing-types/filters/owned.php
includes/src/listing-types/filters/following.php
includes/src/listing-types/filters/related.php
includes/src/listing-types/filters/better-range.php
templates/admin/listing-types/filters/bookmarks-filter-options.php
templates/admin/listing-types/filters/owned-filter-options.php
templates/admin/listing-types/filters/following-filter-options.php
templates/admin/listing-types/filters/related-filter-options.php
templates/admin/listing-types/filters/better-range-filter-options.php
templates/explore/filters/bookmarks.php
templates/explore/filters/owned.php
templates/explore/filters/following.php
templates/explore/filters/related.php
templates/explore/filters/better-range.php
Do not customize these files directly — changes will be lost on plugin updates. Use WordPress hooks for customizations instead.
“MyListing Theme Not Detected” or “Child Theme Not Detected” Error
The MyListing theme and a child theme must both be installed and active. Go to Appearance → Themes to verify.
For further support, visit codicts.com or contact us at support@codicts.com.