Posts by this user

FWP > Clear cache redirects to WP settings
When I am in the WP backend on the Facetwp settings page (or anywhere else), and I do FWP > clear cache from the top menu, the page redirects to options-general.php. Don't know if this has a reason but it is annoying when you want to reset some things, do a re-index and clear caches, and each time you have to navigate back to where you were. Better would be to reload the current page, if possible.
💬 1
Accordion behaviour for hierarchical checkbox facet
It would be nice if hierarchical checkbox facets would behave like an accordion instead of a toggle for each item separately. Now, if you click on a parent item, the children open. Then if you click on another parent item also those children open too. The list can get very long and it requires the user to make multiple clicks to contract all child lists again. It would be nice if a click to expand, contracts all the others. Maybe this behaviour could be optional.
💬 4
SearchWP compatibility improvement for search queries changed with pre_get_posts()
FacetWP is is not functioning properly in combination with SearchWP, when the main query for the search results page uses pre_get_posts() to filter out certain posts. The retrieved posts on a search page DO reflect the filtered posts, also when using facets. But the Facets themselves (and their counts) act like the pre_get_posts() is not there. For example I use pre_get_posts() to filter out Events (Custom post type Events) that are in the past, using a custom event date field. This works great for every query where this happens. It works with normal WP Search and with SearchWP. But when using Facetwp facets on the search result page, the filters go wrong. The cause is in Facetwp > integrations > searchwp > searchwp.php, where the original WP query is killed and a new fresh new \SWP_Query is created. There is a workaround: to double all filtering done with pre_get_posts() in a searchWP hook: It works, but it would be great is the search wp integration just works and takes any adaptations to the search query into account. I suspect this happens more often but is not noticed, because the retrieved posts themselves are correct, only the facets (and their counts) go wrong.
💬 5
Conditional Logic improvements
I have the following suggestions for improvement of the Facetwp conditional logic add-on. On a certain term archive page, I have set up some conditional action based on a chosen selection for a Type facet (based on post types). For example: if Facet Type is 'Accommodation' -> show several additional facets, to drill down in Accommodations. And else do the opposite. This works of course, but it has the effect that on my Accommodations archive page, the same 'drill down' facets are not shown, because the whole Type facet is not active/present there, and the 'Else do the opposite' is the cause of this. So what I would suggest is: - the condition that says IF Facet X is Y then A, should work like: IF Facet X EXISTS AND is Y then A. Or at least make it optional to add a condition that is actually exists. - The conditional 'Page URI' could help also in this case, but is unusable now, I have to enter a hard url. What I cannot say now, but would be very helpful: if page uri = taxonomy X, or = post_type_archive X. Or even more flexible, make a custom field where I can write WP conditional statements myself, selecting the exact archive pages this conditional ruleset or rule should apply to. Basically, this Conditional Logic add-on is not usable in my case because I have different types or term- and post type archives with different facets. And the 'else do the opposite' now prevents facets from showing up, purely because the 'conditional facet' is present on some pages and not on others. In one case I could solve it by making a 'counteract' ruleset with the page uri field set to NOT. But this does not work with taxonomy term archive pages for example. One unpractical workaround I did not try would maybe be to use the Custom selector option and write some jquery that selects a sibling, thus not selecting it if the sibling is not there. But this is getting unnecessarily complicated, as I have many facets and this situation is there for a lot of conditions I would like to build.
💬 4