I have a custom form input field and when Ajax is not enabled, it does appear as a URL query parameter. I then plan to filter the View's query logic accordingly.
However, if I enable Ajax, then it does NOT end up as a URL query parameter although the URL does get modified. It could be that it'll work once I add my custom code to filter Views' query logic, but I was wondering if there was a hook for adding my custom input to Views' "Query Filters" section settings.
Link to a page where the issue can be seen:
hidden link
Hello,
Please elaborate the question with more details:
if there was a hook for adding my custom input to Views' "Query Filters" section settings.
How and where do you setup your custom input?
How and where do you want to add that input to Views' "Query Filters" section settings?
There are a document about Views API hooks:
https://toolset.com/documentation/programmer-reference/views-filters/
For example, filter hook "wpv_filter_query":
When displaying a View listing posts, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_Query class.
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
For your reference.
Hi. I'm Amin's developer on this project.
We already have the logic in place to affect the output via wpv_filter_query with our custom inputs.
However, this only works when NOT using Ajax search.
And when we use non-Ajax search, our custom inputs end up in $extra (see screenshot), which is fine on its face but Views does something really odd (i.e. I don't understand why but would like an explanation) to such query parameters.
I get sanitizing strings, but all it's doing is essentially converting a 'some-string' value into array( '', 'some-string' )
Please advise if there's a way to add our custom inputs into the Views UI / Settings - in the Query Filters part (see screenshot).