hidden link
This page has 2 Views, 1 for the "large" post (limited to 1) and another View for the next 6 posts with pagination (offset by 1).
Both views are filtered by "Categories are: Set by the current archive page" which works really well and the Page template is set via Elementor conditions (not Toolset Content Template).
Our client also needs a Search field to search within that category.
So we need to use the above filter, but refine it with the search keyword from hidden link when visitor uses the search.
Problem is that we can only apply 1 filter for the Category: either by the current archive page or by an URL parameter, not both.
You are describing a "permanent" Query Filter (permanent because it applies with every page load), and a temporary front-end filter (it applies only when chosen by the user).
You cannot apply both at the same time for the same thing, the category cannot be set both by the current archive and by the value coming from a search parameter.
You would have to use code to implement this.
I would set up the View using the GUI so that it works with the search filters rather than according to the current archive.
You can then use the Views API, specifically the wpv_filter_query filter (https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query) and some custom code which checks to see if category has been set in the View arguments (because it was applied by a front-end search filter), and if not set it according to the current archive.
I understand it is not possible to combine the 2 category filters, so I followed your advice and I am now displaying the category posts via an url variable like hidden link which works great unfortunately I lose the good SEO of /category/whitepaper/ but at least this way it is compatible with the search.
Could you confirm this is the right setup, see screenshot, so we don't runt into problems later that I can't currently think of.
When you setup a filter using the URL param, it will grab the value from the URL param and filter the result.
That mean, whatever value will be passed to URL param using that value the posts will be filtered. So, there will be no issue as the value is grab from the URL param.