To vote or comment, enter your email and we'll send a magic link
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.