basic search not working


  • Sean
    Newbie 34 points
    September 5, 2016 at 7:15 pm

    just created a child theme using
    december 2015 as a base
    in “home.php”
    trying to change the location search from city to state.
    tried changing <?php echo $CORE->CUSTOMFIELD_LIST(‘map-city’); ?></select>
    to <?php echo $CORE->CUSTOMFIELD_LIST(‘map-state’); ?></select>

    and changing <select name=”city1″ class=”form-control f2″
    to <select name=”state1″ class=”form-control f2″ (returns no search result)
    and then <select name=”map-state” class=”form-control f2″ (which returns all listings regardless of location)

    how to i get the search to just work properly ????? urgently

  • zarko
    zarko
    Senior Member 360 points
    September 5, 2016 at 7:52 pm

    hi Sean

    You should try to replicate exact advanced search fields when you are customizing this search in home.php file. Create advanced search with fields which you would like to use and than make sure you include all of them as part of the form. For example, state search would be URL like this:

    ?s=&map-state1–2=England&advanced_search=yes

    so try with name=”map-state1–2″ and also attach advanced_search=yes, you can put it as hidden form field


  • Sean
    Newbie 34 points
    September 5, 2016 at 8:06 pm

    hello
    attached is a sample of the code.
    could you show me where to put the advanced search field ??

    Attachments:
    You must be logged in to view attached files.
  • zarko
    zarko
    Senior Member 360 points
    September 5, 2016 at 8:17 pm

    hi Sean

    Try with this code: https://pastebin.com/yxuDMrX4

    This reply was awarded the best answer by the topic poster.

  • Sean
    Newbie 34 points
    September 5, 2016 at 8:20 pm

    thank you very much
    works a treat 🙂

  • zarko
    zarko
    Senior Member 360 points
    September 5, 2016 at 8:41 pm

    You are welcome 😉

  • Bryan
    Bryan
    Newbie 50 points
    January 31, 2017 at 12:48 pm

    @ Zarko, thanks for this. Resolved my own search issue as well. Good thing I stumbled across this :).

    Nicely done.


  • Josh
    Super Guru 13,875 points
    February 1, 2017 at 3:00 pm

    Thanks for updating Bryan 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes