-
Notifications
You must be signed in to change notification settings - Fork 0
8. Filtering properties
Falko Joseph edited this page Mar 4, 2021
·
2 revisions
You can filter properties by configuring the WP_SweepBright_Query::list method.
You can render the search results server side by setting the filter
and sort
arguments from list()
in PHP.
This is probably the easiest way, but it's a little less user friendly, since it requires a full page reload when applying a filter.
If you want to have a dynamic search filter that doesn't require a full page reload you can call the list()
method from an API. You're free to decide on how to implement it.
The returned search results can be transformed to plain JSON object, so your JavaScript front-end can render it on the fly. This allows for a smoother user experience.