• I use this old plug-in that does not have any support anymore. Ultimate WP Query Search Filter ,By TC. I like the plug-in except one thing. It has a exclude tag’s option and I wish it was just a include tag’s option. every time I create a new tag I have to go into the plug-in and check to exclude that tag (this adds up because 20 to 50 new tags a year)

    Basically I want to plug-in that a user clicks on 1 of these choices (summer, spring, winter, fall) . Plus the click on 1 choice of (walleye, sunfish, bass) then they chose type of water ( lake, river, ect..) then they hit the search button which resluts would be like Catigory#288 Tag summer+bass+lake.
    with category being just the articles only and not videos or other materials form the website.

    Look the page added that I need help with you will see what happens when new tags get added.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    If you don’t mind all the labels being backwards (exclude actually means include), I think there is an easy fix to reverse the logic of which tags to show. But it appears all the tags would still be in every drop down, or is there a way to select by field? If your need is just for this one page and all tags appear in every field regardless of include or exclude, and this form rarely if ever changes, you would be better off hard coding the form HTML to appear as you want. The form handling to fetch applicable posts would remain the same. You are just forcing the display of only certain tags in the form.

    I don’t think reversing the logic is the best approach, but if you want to give it a try (it’s untested and may not work), here’s what to do. I’m looking at version 1.0.10. Be sure our versions match. Open the /html/searchform.php file for editing. At line 56 you’ll find this line:
    $args = array('hide_empty'=>$v['hide'],'exclude'=>$eid );
    Change the exclude to include, then save the file. We could also hard code the tag IDs to display if this form is not used anywhere else. Then the entire exclude dialog would be ignored, and only the tags you want that are hard coded will be displayed.

    You really are better off with a better plugin, but if you have trouble locating one, you can improve on the current plugin if need be. It’ll be an ugly hack, but I think it’ll work.

    Thread Starter jhinkemeyer

    (@jhinkemeyer)

    I finally got some time to look at this. I made the change that you said. I did not fix it. However I found the same line in uwpqsf-front-class.php and changed that one to “include” as-well. That fixed the selection with in the tax fields. so we completed are mission. But now I can’t get any results when searching.

    I will try some more testing tomorrow. I just am not that knowledgable in php. Might be one of them things the company owners might need to outsource if I can’t figure it out.

    Thread Starter jhinkemeyer

    (@jhinkemeyer)

    Dude I got it. I forgot I had a hidden field that just selects the category and I never labeled it and it was hidden via CSS. so I totally overlooked it in my fields list. Long day.

    Thank you so much for your help! really appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ultimate wp query search filter alternatives?’ is closed to new replies.