Here's the Archive page in question: hidden link
In the above archive page, I have field to display taxonomy terms as links. When the term links are clicked, the user is redirected to the taxonomy archive, which is OK, but the problem is that the custom search filter (Services and Modalities) no longer shows all filter option results in the drop down.
When I submit a search using the same search filter, the page url changes to: hidden link
As I mentioned above, when I click the taxonomy term link, the page redirects to the archive page: hidden link
Is there a way to make the taxonomy term links redirect to the search filter result instead of archive page? Or, is there a fix to show all filter option results in the drop down when viewing the archive page?
I know you can have taxonomy term names without the link, but I would like to give the option to simply click on taxonomy links to narrow down their search.
Thanks in advance!
James
Hi James,
Thank you for contacting us and I'd be happy to assist.
Under the 'Custom Search' settings in views and WordPress Archives, you'll see the option 'Show only filter options that would produce results'.
You can disable it and the search form will always show all options in the search fields.
regards,
Waqar
Thank you Waqar. I did disable the option per your instructions, but I have the same problem as before.
Perhaps I was not clear in my previous message. Please see the screenshot that I uploaded, and you will see how the custom search filter (Services and Modalities) looks when I click on a taxonomy term link. The problem is that the custom filter drop down does not show other options after clicking a taxonomy term link (even though I disable the option you mentioned).
As I explained before, I believe this is related to the fact that I'm clicking on a taxonomy term link (in the "Field and Text" block), which redirects the page to a term link archive page, not the actual search results query.
Please let me know if you would like me to create a video.
Thanks!
James
Thank you for sharing this update and I understand, what you mean.
The option in the search filter is limited to the current term, because it is that particular term's individual archive page.
A workaround in this case is to create a new search page a with a post view as explained here:
https://toolset.com/lesson-placement/lesson-placements-1622935-1621213/
This search will have the same search fields that you'd like to show in the sidebar of your archive pages.
Once ready, you can load this view's search form on the archive page and it will be showing all the options and not just the current term.
As can be seen in the attached screenshot, you'll divide the archive's output in two grid cells and move the 'WordPress Archive Search' and 'WordPress Archive Output' blocks in the second cell.
And in the first cell, you'll include a view block that will load the new search page's view as existing view, with only the 'Only the search form' option selected. For displaying the search results, you can select the same search page where you created the view.
When the user will perform a search through this view's search form, it will take them to that search page.
OK, I've created a separate new Page with a View that includes the same search fields that I'd like to show in the sidebar of your archive pages.
However, I'm running into a problem. When I try to add the new View in the Archive page, I get an error: "Nested views creation is not supported at the moment." Please see screenshot.
Perhaps this is the reason why I don't see the options: "Only the search form" and "On another page".
Also, my concern is that this workaround would require a second search form "Submit" button. Is this correct?
Regarding my original inquiry when clicking on a term link, is there no fix to make the search filter show all available terms after redirecting to the term's individual archive page? This was my primary reason for opening this support ticket.
Thank you.
> However, I'm running into a problem. When I try to add the new View in the Archive page, I get an error: "Nested views creation is not supported at the moment." Please see screenshot.
> Perhaps this is the reason why I don't see the options: "Only the search form" and "On another page".
- You'll see this error, only if you try to create a new view using the view block. If you'll use the 'Use existing View' option, you'll not run into these issues.
The goal is to load the search form from the view that you've created on the new search page.
> Also, my concern is that this workaround would require a second search form "Submit" button. Is this correct?
- The actual search form and submit button of the archive, can be hidden using some custom CSS code.
> Regarding my original inquiry when clicking on a term link, is there no fix to make the search filter show all available terms after redirecting to the term's individual archive page?
- Yes, I'm afraid, the default behavior of the search fields in the archive's own search form can't be changed. This is why I've suggested to load a search form from a view, as a workaround.