• Resolved amycarolyn

    (@amycarolyn)


    This plugin seems to be working well, that’s exciting. I noticed the search terms are blank though. I wanted to have the results say, You searched for [metakey1 option x] in [metakey2 option y]. But right now the results just say “You search for:” and where the search terms normally appear, it’s blank. Is there a way to include the search terms when using only the Custom Meta Field with Custom Post Type search?

    https://www.ads-software.com/extend/plugins/wp-query-search-filter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author TC.K

    (@wp_dummy)

    @amycarolyn,
    You can include the search term by customize your theme’s search.php file. But themes usually have the different approach to get the search term. So it is hard to tell which specific part you need to customize.

    Commonly most themes are using

    get_search_query()

    to get the search terms. If your theme have this line then it is the place you need to customize. You can paste the following codes in your function.php.

    Thread Starter amycarolyn

    (@amycarolyn)

    Thanks! I did try this. With one of the dropdowns empty I get:

    Search Result for Food & Beverage,,wqsfcmfall

    Do you know what I might have done wrong?

    Thanks again for the code sample.

    Plugin Author TC.K

    (@wp_dummy)

    I hv modified the codes.
    For empty dropdown option (in your case), you can change the line
    if($v['value'] =='wqsfcmfall'){$sterm[]= 'you can put value here'; }//

    This is not the ideal solution though, maybe i will come out a better solution in the future.

    Right now I am busy with something else, hope that i can squeeze some time for this plugin. Because I am planning doing a major upgrade to this plugin, and this search term feature will be included.

    Thread Starter amycarolyn

    (@amycarolyn)

    Thanks, this fixed the issue of wqsfcmfall appearing when the selection is blank. Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search Terms Blank’ is closed to new replies.