Forums › Forums › Search & Filter Pro › Shared taxonomy issues
Tagged: taxonomy
- This topic has 14 replies, 3 voices, and was last updated 7 years, 5 months ago by Anonymous.
-
Anonymous(Private) July 26, 2017 at 1:24 am #122773
Big thanks for the assistance, Ross. Your update along with the following filter seems to be doing the trick for me:
https://gist.github.com/dryan1144/c0b678f8a27c94ec39b8cf803f4b5093
Do you see any issues with this approach? I filtered
get_term_link
using theterm_link
method you suggested and got the term archive links themselves to update (I’m manually creating my links to the term archives themselves so it’s not as important from that perspective to have theget_term_link
output the correct URL). But using thesf_results_url
actually enabled the filtering on the taxonomy term archives as expected.Thanks again for the above and beyond support to both of you.
Ross Moderator(Private) July 26, 2017 at 11:50 am #122843Hi David
I’m glad this is working for you but I do not imagine it would cover all use cases (you might not need it to).
What happens in S&F form, with taxonomy archives enabled is:
— If your search form appears somewhere on the site that is not one of those archives…
S&F will redirect when the form is submitted, to the results URL (which will the be the post type archive).— If your search form appears somewhere on the site that is not one of those archives… and you choose a filter in the list that is a taxonomy (with archives)…
Then S&F usesget_term_by
to build the link for that taxonomy term archive and redirect there.This is all with “enable filtering on taxonomy archives”.
Now, where I think your code would work is, if you don’t have
enable on tax archive
enabled, and you have regular search form, that will never useget_term_by
because of this setting. Then it will always use results URL and I think in that scenario it will all work fine.This is all fairly hypothetical though as I can’t see what your doing – hope that makes sense!
Thanks
-
AuthorPosts