I needed to add a price range filter to a Toolset View (number field: sale-price-toolset) and wanted simple ranges (e.g., $0–$2000, $2001–$4000), but couldn’t get any approach to work.
Solution:
Add a BETWEEN filter on the price field to produce FROM/TO inputs, hide those inputs, and use JavaScript to control them (e.g., a range slider) so the View receives min/max values; this approach worked after testing.
The client needed to restrict backend visibility and editing of “Provider” posts so that “Manager” users could only view or edit Providers linked to the same Zip Codes via Toolset relationships. WordPress doesn’t natively filter post listings by relationships.
Solution:
Two many-to-many relationships were created: provider-zip and manager-zip.
A “Manager” custom role was added in Toolset Access, with each Manager tied 1:1 to a “Manager” CPT post.
Custom PHP was then added (via Toolset’s “Custom Code” feature) to:
Filter the Providers admin list using pre_get_posts, showing only Providers sharing a Zip Code with the logged-in Manager.
Enforce edit/read/delete capabilities using user_has_cap so Managers can only manage Providers they are linked to via shared Zip Codes.