Support » Plugin: WP Store Locator » Search by store name/details

  • I was wondering if there would be a simple way to create another search field, that would actually find a store by name or description, but still show it on the map and in the search results.

    So the user could search either by location, or by store if he new already which store he’d like to visit, but would forget where the store was located.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tijmen Smit


    This isn’t possible the moment, but I will add support for search by name in the 2.3 update.

    If you’re comfortable with code, then I can point you in the right direction how to make this work yourself.

    Thread Starter gresakg


    I am indeed comfortable with code so any hint will be appreciated.
    Thanks, Greg.

    Hi. Same thing here. I want to sort search results by certain values on description or even better by content in excerpt which will be same for certain stores which i want to be displayed on top of other stores. So first these stores sorted by date modified then other by distance.
    Please point me where can i accomplish this.

    Plugin Author Tijmen Smit


    @gresakg How I would do it is to first create a custom template. In the template include a checkbox so users can choose to search between name / location.

    If you give the checkbox a ‘wpsl-custom-checkboxes‘ class, then the value is automatically included in the AJAX data.

    Then use the wpsl_sql filter to either run the normal code, or make a search for the match locations based on the title. You do need to get the ID of the location, and make sure to grab the required meta data ( address, lat / lng data etc ).

    @civid if you want to set a featured store, then this article explains how to make it work. If you want to change the sort order based on the existing meta data, then take a look at this article.

    Great. Exactly what i want.
    Great plugin, excellent support.

    @tijmensmit Hi, that’s what I wanted. add it to show only the nearest store or the nearest 5 stores, etc.

    sorry you already have that.

    Hi There @tijmensmit

    I too am trying to accomplish this. I am very familiar with code and comfortable to make any changes..

    My problem is with how exactly to reference the searched value/store name within the wpsl_sql and wpsl_sql_placeholder_values filters

    no matter what i do the value of the wpsl-search-input input box does not seem to get included in the ajax data ($_GET or $placeholder_values) objects.

    I have a custom dropdown created for search by name or search by location and an conditional statement to handle the two, but within the condition for “search by name” i will need to know what name they attempted to search within the wpsl-search-input input box to use in the query as a LIKE with wildcards, no?

    Please advise on what i can do to solve this, any help would be greatly appreciated. I have scanned the code within the class-frontend.php to try to gain an understanding of the order of filters and how everything calls what but i cannot seem to scope out when the value of the wpsl-search-input is even used in the first place

    maybe i need to make sure it is added to the transients from the $_GET object?

    Thank you very much, i have a client who is waiting for this functionality very impatiently

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search by store name/details’ is closed to new replies.