Advance WP Query Search Filter

Finally the new wp query search filter is released! Known as Advance WP Query Search Filter, it added many new features in the plugin. In nutshell Advance WP_Query Search Filter let your user perform more precisely search by filtering the search through post type, taxonomy and meta field. Ideal for website that have multiple post types, taxonomies and meta fields, eg property website, product website etc.

 

Plugin Features:

  • Admin are free to choose whether the search go through post type, taxonomy, meta field or even all of them.
  • Multiple Search Form Supported.
  • Search form now support checkbox,radio and dropdown fields.
  • Using wp search template to disply the result.
  • Admin can define how many result per page.
  • Admin can sorting the result page by meta key and meta value.
  • Using shorctode to display the search form.
  • Generate meta value by a click

Installation

  1. Upload advance-wqsf folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Create your search form in the Advance WQSF.
  4. Using [awsqf-form id={form id}] to display the form.

FAQ

How can I styling the search form?
You can simply refer the awqsf-style.css.css that come with the folder and alter it or override it at your theme css file.

What if I want to display the search form in the template?
Put this into <?php echo do_shortcode("[awsqf-form id={form id}]"); ?> your template.

What if I want to display the search form in the sidebar widget?
Just insert the shortcodes like you inserted in the post content. eg. ‘[awsqf-form id=3299]

What if I don't want to display the title of the search form?
Just giving
0 to formtitle atribute in the shortcode eg. '[awsqf-form id=3299 formtitle="0"]

How to customize the search query (normally the text in search for in search template) ?
You can use awqsf_search_query filter to customize the search query to fit your need. eg

Sreenshots

You can download Advance WP Query Search Filter at here:

Download Advance WP Query Search Filter

Notice :  If you now using my old WP Query Search Filter plugin, please deactivate/uninstall it before using this plugin.

Version 1.0.8 UPDATE NOTE:
In version 1.0.8, I added two action hooks in the search form – awqsf_fhead() and awqsf_fbottom(). Now you can add more field in the search form easily. :)

Support

If you like my works/efforts don't forget to donate to support further development.

With your help I can make my works/plugins even better!

$5, $10, $100 or $1000 – any amount is fine with me!  :-)

Thanks!

Notice: Now the comment area has been closed. Please use our new support forum to post your question. Thanks!

Visit Advance WP Query Search Filter Support Forum

Join the Forum discussion on this post

81 Comments

  • Yebo says:

    Looking Good, Just investigated setting up a website with custom fields and custom post types. The only thing holding me back was a proper search. This plugin looks like it is going todo the trick. Maybe you can look into other thing (not needed for my purpose currently but can be handy for property websites. Maybe if people filter for lets say bedrooms and they select 3 that it automatically shows posts which have 3 bedrooms or more

    • tck30 says:

      Yes, you can do that by defined the bedrooms comparator to >= (Greater than or equal to ) (assuming that bedrooms is meta field ).

      • Yebo says:

        Cool will try it out, currently busy with another project which does not require search but when I have time I will look into this plugin a bit more and discover all the posibilties.

  • Duncan says:

    Is it possible to create a results page? I would like to use this to show a list of custom post types but do not want it to use the default search page.

    • tck30 says:

      Yes, you can. You can manipulate the search.php file.
      Put this in the loop:

      if(wp_verify_nonce($_GET['s'], ‘awqsfsearch’) ){ // checking if the search is from this plugin
      include template.php ;//customize the search result or include your custom template }
      else {
      do your default search template.
      }

      • Andy says:

        Thanks for a great plugin.

        I’m also trying to create a results page. I copied the code above into search.php, but I am getting a syntax error no matter where I place it.

        I’m using the standard twentyeleven theme. Any suggestions where I might be going wrong?

        • tck30 says:

          hi,
          Try this


          if(isset($_GET['wqsfsubmit']) && $_GET['wqsfsubmit']=='Search') {
          include template.php ;//customize the search result or include your custom template
          }else{
          do your default search template.
          }

  • Lucas says:

    Is it possible to display two or more combo boxes in a single line?

    • tck30 says:

      What do you mean combo boxes in a single line? Is that the way to display the search input?

  • Silas says:

    Is there anyway I can add a search bar to filter through first names, last names etc. I am going to have thousands of profiles i need to search through on my website…

    • tck30 says:

      Do you mean you want to search through your site user? If so, this plugin doesn’t support that.

  • ASHKAR says:

    It’s Great plugin .. Thanks

    But there is one problem (WordPress Version 3.5.1)

    when i activated the plugin, there was a title issue at home page , categories and posts

    this issue can effect site SEO

    please check it :)

  • klewis says:

    Is there a way to filter the search results? Example.. Chose Meta tag 1 (State in this Case)… Then show only posts with Meta tag 2 (Cities within That state)

    • tck30 says:

      Well, it depends. For example, for state-city relationship. 1 city only assigned to 1 state, thus if you choose state, then all post with state meta will be displayed. This will include all the posts with the city within state. However, if relationship like student – hobby. A student can be more than one hobby (sport, music, reading), then if choose student meta field, then all the post with sport, music and reading with be shown.

  • Chris says:

    I want to do prices and have them display like £10,000 how is this done. I cant seem to get that working.
    Mainly as the separator for taxonomies and custom fields is a comma. Hope I am making sense.

    • tck30 says:

      Well,I don’t know how you store your price. If you store your price with 10000, then you should use that in the search form, without the “£” and “,”.

  • DT says:

    <q cite="What if I want to display the search form in the template?
    Put this into your template.”>

    Hi think there is a missing ] in this part from the documentation ? Great plugin so far am testing it right now.

  • alanna says:

    okay this was probably already answered
    but i jsut want a simple search to find posts of a specific title and if they don’t type it right that it spits out a message saying file not found, would you liek to rety or something similar i don’t want it to list everything in my site. cause somethings are for members only.

    please? tell me how great guru.

    peace

    • alanna says:

      wants to feel special is why i asked.

    • tck30 says:

      Not quite sure what you want to do.
      Are you using the string search only?

      they don’t type it right that it spits out a message saying file not found

      What do you mean spits out a message saying file not found?Is it a pop up? Or just the result page. If it is the latter then it should be already included in your search.php template.

      If you want the search exclude posts from members, do you have particular taxonomy/term for your member’s post? If you do, then it would be easier to exclude that term from the search. If you don’t, then maybe it can be done by editing the plugin files (not recommended though).

      Hope that I understand your question right.

      • alanna says:

        yes using search string i only want the results page to show an answer if the exact search string is found. if blank, then i want a no results page.

        begin search>
        if search $= empy or = to 0 then go to no results
        if search$>< exact name go to no results page

        only if search $ = "" then goto page
        otherwise go to no results page

        have not tried the taxonomy as that is new for me to wrap my mind around.

  • alanna says:

    “” meaning exact search string

  • Master K says:

    Is it possible to have multiple dropdowns that modify each other. For example:

    I am using custom taxonomies and meta-data to enter products in a site.

    If I am selling tables…
    First dropdown shows Colors available.
    if Black is chosen then second dropdown changes to show only the styles available in black, like round and rectangle.
    Then based on that the third option refines to only show item option that match the first two. So the third dropdown might then only show Oak and Glass.

    As each option is chosen the listing on the page would change.

    Can your plugin allow that type of drill down?

    • tck30 says:

      Hi,
      what you meant is dependent dropdown field. Unfortunately, this plugin doesn’t support that. What you want is heavily relied on javascript and ajax, it will be easy if it is custom made.

  • Marjorie says:

    Hi,

    I am working on a new portfolio and I’d like to be able to filter my projects via 3 different taxonomies. (device, domain, services).
    I would like to be able to click on the name of the filter to activate or desactivate it. It means, no more radio button, and no more search button…
    That way when I chose a filter, the result underneath update right away.

    Thanks,
    M.
    Is there an easy way to do that.

    • tck30 says:

      No,
      Currently the support doesn’t support this. Maybe soon I will come out plugin that for this feature.

  • Steven Slack says:

    I am running wp_debug on my local server and I am getting all kinds of errors and warnings. On the front end when I preform a search I get this return multiple times:

    Undefined variable: searchterm1 in /~~~~~/wp-content/plugins/advance-wp-query-search-filter/includes/process.php on line 198

    On the admin side if I save a custom search I get this error:

    Notice: Undefined variable: post_id in /~~~~~/wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 253

    Notice: Undefined variable: post_id in /~~~~~/wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 254

    Notice: Undefined variable: post_id in /~~~~~/wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 255

    Notice: Undefined variable: post_id in /~~~~~/wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 256

    Warning: Cannot modify header information – headers already sent by (output started at /~~~~~/wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php:253) in /~~~~~/wp-includes/pluggable.php on line 876

    This returns a blank screen. Are you debugging this plugin with proper WordPress debugging practices? http://codex.wordpress.org/Debugging_in_WordPress

    Let me know if you get these issues resolved.

    Thanks

    • tck30 says:

      Hi,
      The warning (Undefined variable: searchterm1) will be solved by the next release.
      However, the other error seem is weird, Never met this before. Maybe the file was incomplete downloaded? Try download/install again. Let me know if it is still not working.

      • Steven Slack says:

        Wow! Thanks for responding and the latest update fixed the first error. I am still getting the same errors in debug mode on the admin side when I save the settings.

      • Steven Slack says:

        I also think it is worth mentioning that I am working on a localhost in MAMP and I have a multisite installation.

        • tck30 says:

          I never try it on multisite, maybe this is the reason why it doesn’t working.

          When you on the form edit page (not create new form), do you see something like this
          wp-admin/?page=awqsf&formid=5&formaction=edit ?

          • Steven Slack says:

            I am seeing the following when I am creating a new form:

            wp-admin/?page=awqsf&formid=new&formaction=new

            I also am using the default twentytwelve theme and I have no other plugins installed. I’ll run the latest version on my live hosting environment and see if I get the same errors.

          • Steven Slack says:

            When I am saving a new form I do not get the error. WHen I am editing I get the error. Here is the URL that I see:

            wp-admin/?page=awqsf&formid=19&formaction=edit

          • tck30 says:

            It supposed not act like this. Can you try on the single wp installation to see if the error still exist?

      • Steven Slack says:

        Still getting this error on a single install with wp_debug set to true

        Notice: Undefined variable: post_id in /wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 253

        Notice: Undefined variable: post_id in /wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 254

        Notice: Undefined variable: post_id in /wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 255

        Notice: Undefined variable: post_id in /wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php on line 256

        Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/advance-wp-query-search-filter/advance-wp-sf2.php:253) in /wp-includes/pluggable.php on line 877

  • Artur Wow says:

    Hi!

    Can you perform an implementation of “JQuery Range Slider” to be used with BETWEEN (or another sectors)?

    NOTE: To be clear, “range slider” can be found in:
    http://ghusse.github.io/jQRangeSlider/
    AND founded on (grounded):
    http://api.jqueryui.com/slider/

    Your work will get the “Perfect” Status if it happens :)

    (I don’t know why you did not use this desired and modern feature; Anyway, the sugestion is here).

    Going to the perfection,
    many thanks!

    Artur
    ________________________________________
    Sorry for my english’s knowledge;
    I prefer the perfect: portuguese.

    • tck30 says:

      Actually it is already in my mind. Thinking make it into a javascript and ajax version of this plugin.

      But still, thanks for the suggestion.

  • Maher says:

    I made the form to search for categories but in result it displays nothing. any recommandation or help. here is the link for the site and the form is in the right below.
    http://www.annoncesentunisie.net/
    You can make a try and tell me wht’s the problem.
    Thanks

  • Debbie says:

    Thank you so much for this plugin! It is absolutely brilliant. I will be making a donation in the near future by God’s grace.

    Kudos!

  • John says:

    Hi!
    I tried to add new search filter with custom meta fields, but got only a button on front page.
    How to solve the problem?

    Thx!

  • Brad Snyder says:

    I’m using your latest plugin with the Max Magazine theme. I want to have the search form search posts only on this page: http://the-ezone.org/video-posts … I’ve placed the short code into the posts page, but I cannot get the form to display. I do receive a message at the top of the page “Please enable theme settings from the theme options” but I cannot find any place to enable any other settings.

    Also of note, the plugin does seem to work as a widget.

    Any thoughts?

    Thanks

    b

    • tck30 says:

      I don’t sure what’s your problem, but mostly is the problem is caused by the theme.

      “Please enable theme settings from the theme options” this indicate that your theme need some setting. Consult with your theme developer regarding this problem.

      And no, the plugin doesn’t work as widget, but you can use the shortcode in the the theme text widget.

  • Steven Slack says:

    OK – So I am noticing that when I do a keyword search with the plugin I am not getting the search result in the title. I have tested it with several themes including TwentyTwelve. Most search terms get displayed with get_search_query(); Any insights into this issue?

    I have also tried to highlight search terms with several other plugins and none work with this plugin.

    Any insights would be helpful.

    • tck30 says:

      Hi,
      Are you refer to page title? If yes, the plugin have a filter for it – awqsf_search_title() . basically it is like wp_title filter where you can change the page title you like.

  • ApuestoKid says:

    Hello!! I’m using your plugin and it’s awesome, but I don’t know if there is an easy way to get all the search “terms”.

    I’ve created a search page, and i want to make in the search loop the “else” conditional for if there’s no results.

    I would like to put something like “nothing found with the words: “thewords” and the categories “thechoosencategories”, etc…..
    Is there any way, shortcode, function or something that list all the search criteria?
    Thanks in advance!!

    • tck30 says:

      Yes, you can. Please refer to awqsf_search_query filter,see the example in the post above.

  • Steven Slack says:

    Hello, I am having fun customizing your search plugin. Please take a look here: http://74.52.121.34/~acstaff/job-search/ I have created a custom post type with several taxonomies. I have noticed that if I do a keyword search for one of the taxonomies I do not get a return. We are afraid the user will enter a keyword over using the search filter and we want to make sure this covers all of our grounds.

    Thoughts on this?

    • tck30 says:

      The keyword search will only go through post title and post content. When user search by keyword, the taxonomy (and custom post type) will be ignored. So in your case, if you want the user search the taxonomy by entering keyword, then you should add those taxonomy’s term in your post content.

    • Sandeep says:

      What a cool interface @Steven Slack. could you plz share the css? how could you made this? it looks so cool.

  • I’m trying to implement this on a standalone page, but searching 4 taxonomies makes it a very long form. Can you explain how I should customise the css so either checkboxes display in a row left to right below the heading or so the search form has several columns?
    Thank you!

    • tck30 says:

      Please refer to the advance-wp-query-search-filter/css/awqsf-style.css .

      You can try this for checkboxes to display in line:

      label.taxcheckbox, label.cmfcheckbox{float:left;width:100px;}

      Play around with it, eventually you will know how to customize the styling.

  • Jon says:

    I’d like to be able to search taxonomy, custom fields AND a search term. It seems like that should be possible… can you help?

  • Ryan says:

    What would be required to make the dropdown search fields use conditional logic. Eg. If you select taxonomy dropdown “Canada” then it shows a dropdown of “canadian cities.” Thanks for the plugin, btw.

  • Swetha says:

    Hi,

    Can this plugin help me create search areas like on this website http://www.a-grader.com/search-tutor.htm#search-list

    In short it should fetch the details of the registered users in the website.
    Kindly advice.

    • tck30 says:

      No it can,t, it only search for posts. But if your users registered under post type, and yes it can.

  • Ben says:

    Hey, great plugin so far. I am trying to set it up to do an AND search rather than an OR when two or more custom taxonomy fields are selected, but it seems to be ignoring the boolean part. For example, if I search for something which only has alloy wheels but not air conditioning, but I tick both checkboxes on the form, it still returns the result, when I think it shouldn’t, as the item doesn’t have both features? Is there any way I can check on what is happening please?

    Thanks for your help in advance!

  • tck30 says:

    Is your alloy wheels and air conditioning is in same taxonomy?

  • Andy Ward says:

    Hi there I have recently implemented your ‘Advance WP Query Search Filter’ plug in to the following website merje.com
    It works great but I have an issue whereby it doesn’t leave displayed the choice that users have made when viewed on a PC (or Firefox on Mac)
    I have tried edited the css file to no avail ?!?!?!

    Can you help ?

  • Hi,
    I am developing a site and have installed the ajax version search. I am trying to get one of the meta value fields to display on the search results page…just don’t know how. The value is price and it is one of the search values on the form. I have tried many different ways of adding the meta value on the process.php page but it won’t display the price. I am not a programmer and have tried to copy other php code from the web and the jigoshop code(that is what I am using to display the properties on this site. I was ale to add post values to the search result but no meta values. Can anyone help??
    Thanks in advance,

    • tck30 says:

      You shouldn’t asking at here, this is for Advance WP Query Search Filter, not Ajax WP Query Search Filter. Please go to here to leave your comment.