Hi,
The Facets on my site stopped working, after quite a bit of investigation it came down to FWP not detecting the query string from the Looper Provider. Using a filter I fixed it but there’s no clue why this broke after 7 months in production.
This is the query in question:
post_type=plant&facetwp=true&order=ASC&orderby=title&meta_query[0][key]=hps_image_type&meta_query[0][value]=Conservation Plant&meta_query[0][compare]==&meta_query[relation]=AND
This includes the &facetwp=true which is supposed to be picked up by FWP, but failed.
The feedback from FWP is below, which might make more sense to you:
The one you posted earlier used $query->query_vars instead of $query->get which for some reason seems to be more reliable to match against.
With strict query detection on - facet only detects a main archive query, a custom query with facetwp=>true, or a facetwp listing template. With strict query detection off, any query that wordpress identifies as an archive query can be detected even if its not the main query but this often causes unwanted auto-detection.
Without seeing what is happening in code with the page builder, it is hard to access by the facetwp=>true isn’t working but there are a number of page builders I have seen that only work by using facetwp_is_main_query to target the correct query.
@charlie Maybe this is useful for future Pro query strings?
Best wishes, Bill.