Forums › Forums › Search & Filter Pro › Search form stopped working. Possibly cache issue?
- This topic has 18 replies, 2 voices, and was last updated 5 years, 1 month ago by
Anonymous.
-
Anonymous(Private) September 30, 2020 at 12:07 pm #261409
I apologize for having you debug my own mistake but I thank you very much. It is working.
I was once at a WP talk and the speaker said try to avoid using -1 for Posts Per Page in case you have too large of a dataset. But that was a while ago, and i know my dataset is not large so thanks for the tip!
Another question:
If I want to add the poet_name to the search query when I click on that poet’s name, should I use that edit-query-arguments?Anonymous(Private) September 30, 2020 at 12:25 pm #261417When you’re looking at the list of titles in the results section, below each title is a poet name and a poem name that is clickable but right now doesn’t do anything. I would like to add that clicked custom field (i.e. Whitman, Walt) to the search query when clicked.
I would want to programmatically trigger another search using the current search query arguments and adding the clicked query argument (Whitman, Walt).
Trevor(Private) September 30, 2020 at 12:30 pm #261419Ah. So, I would be on a page that has the search form, and a list of posts. In those posts are the authors. You want to be able to click the author, and instead of going to the author page, you want to trigger the search and add that author?
So, the author field would need to be in the form. Would you want to show it or hide it? If you want to hide it, use some custom CSS to do that, but, if you hide it, how does the user remove it from the search if they want to?
The Author term would have to be a link that triggers some custom JavaScript to run.
That would fetch the term from the link, set that in the form field, and then trigger a submit, using
$('.searchandfilter').submit()Anonymous(Private) September 30, 2020 at 12:45 pm #261423Actually, The poet_name is a custom field that is already in the search form UI (Whitman, Walt is in that Poet drop-down list).
I have written js code that can get the term (whitman, Walt). Can I set the search form field using js? I see php code to do that. -
AuthorPosts