Controller (soberwp) with FacetWP

I’m currently building a site for a customer with ACF content modules (flexible layout). Some of these modules consist of a listing & filters for which I use FacetWP.

I build everything with the controller, here is a snippet of the loop over the layouts and loading a specific template for it:

The data gets filled likes this where I create a loop and fill the results into the array:

However, this solution doesn’t work with the way FacetWP works. Basically right now multiple loops gets executed and the filtering doesn’t work.

My question, does anyone here tried to solve this in combination with the controller?
My goal would be to not create the custom loop in the template itself but in the controller.

Any hints appreciated :wave:

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.