- This topic has 12 replies, 2 voices, and was last updated 7 years, 11 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Filter results based on user-role logged in
Tagged: filter, query, User roles, Wordpress loop
Hi Trevor!
When I print the div, it appears in front of the filter. The $query_args are indeed an array of all filter-settings. When I do the same after redefining the query, it is an array with the newly defined arguments.
Ah, I’ve figured it out. I had to combine the old and the new query-args. I’ve done this by renaming my query-args into $new_args. Before returning the $query_args I included this line. Now it seems to work. This is a little unclear in the documentation.
$query_args = $query_args + $new_args;
Thanks!
ps. Thanks for editting, multiline code in Slack works with 3 code characters 🙂