Hi there. I have encountered Vantage theme on one of my client’s sites.
1st – Upon his request, I have changed the style of search bar in the header, now it only shows the location search bar.
But when I want to add this location search bar to anywhere else with a php snippet (the exact same search bar), it does not search for the location input, its searching all listings instead.
I noticed that when I make search via the search bar’s new position; the link of the search results is exatly same with the normal bar, but lacking the last coordinates part (lat and lng options).
Is there a way for me to fix this?
2nd – Since the location search box does not show up in mobile; users can not input the location data to search their needs based on locations. I have made a button which is directing to the link of; ” /listings/?location=&location_geo_data=&st=listing&lat=&lng= ” but there is no search box in this page at all. Am I able to add a functional location search box in here?
Thank you.
Hi Sinciasar,
Do you have a public URL where we can take a look at your setup?
Hi, first of all; thank you very much for your reply.
Here what I did; https://www.matematikozelders.com/
On the top of this site, you can see I have modified the search bar of vantage theme as for using just location searchbox (lcs). I removed the other search box which was next to lcs’s left side.
Now, I got this location search box’s php code from root directory, /wp-content/themes/appthemes-vantage/searchform-listing.php
You can see the code I got from that php file below;
And I created a php snippet with Insert Php Code Snippet plugin.
Now, when I added the php snippet with a shortcode to somewhere else (for example on the main slider, there is one example I left for you now) it’s still making a search but does not filter as the selected location. It’s showing all results no matter what location they are related to.
But the normal button on the top of the page is making a accurate search.
I made same searchs with both buttons by typing “Ankara” in it (it’s a city in my country) and here is what I got;
The button on the top of the page is showing only the listings related to “Ankara” (which is right thing to do)
But the other button I have placed on the main slider shows all listings. (Right now it wont show you this thing because all listings are modified as Ankara city based.)
I noticed that the search results are directing different links. Like;
When I search “İzmir” with the button on top, the result link is ending with “lat=38.423734&lng=27.142826000000014”
But when I search “İzmir” with the button on the slider, the result link is ending with; “lat=&lng=”
And also, the search results acquired by the box on the top of the site are showing diameter option on the left side. You can see on attached image.
So basically, my new button is not working properly.
My 2nd question was about this too. The mobile version does not have that lcs on the header. So I wanted to add a link which directs to an empty search page, then people could make a search on there on the mobile. The site’s empty search results are showing in this page; https://www.matematikozelders.com/listings/?location=&st=listing&lat=0&lng=0
Can I add lcs to here also? (I mean a working one)
Last thing.. I have just noticed.. When you try to autocomplete a form data while writing.. Pressing enter is popping an error as “Autocomplete’s returned place contains no geometry” you can try and see live by trying a search with pressing enter.
Thank you very much. Sorry for long explanation :(
My image links have a problem :(
Here are direct links;
Location Search Result Differences Between Two Search Boxes;
https://i.postimg.cc/Xqb93FMy/locationsearch.jpg
Search Box On Header;
https://i.postimg.cc/3J32cgCs/standartposition.png
New Search Box That I Have Created On The Main Slider;
https://i.postimg.cc/ZKj6tCwC/thenewbutton.jpg
Hi Sinciasar,
Thank you for your reply. Unfortunately, you’ve mistaken us for AppThemes. AppThemes is the developer of the WordPress directory theme you’re using. For more information on this, please refer to the following article:
AppThemes Vantage and SiteOrigin Vantage
This is beyond the scope of what we can help you with, but you could hire a developer to implement this for you. We recommend using Codeable. You’ll be able to hire someone at an hourly rate to do this work for you. Alternatively, I would reach out to AppThemes about this.