Firstly thank you for taking the time to look at my question.
I have a project where I have integrate a find nearest location function on a Wordpress website. The functionality should work as:
A user inserts their postcode into the search bar, and the results shown are shops which are nearest to their postcode.
Has anyone done anything like this before and if so do you have any recommendations on plugins or tutorials which could possibly help me.
Thanks
The functionality you are looking is basically radius search for given zip code. I will suggest you to go through with this nice article to get start and complete your task.
https://www.dougv.com/2009/03/27/getting-all-zip-codes-in-a-given-radius-from-a-known-point-zip-code-via-php-and-mysql/
After much research I found a suitable plugin for the job:
https://wordpress.org/plugins/gwebpro-store-locator/
There are many plugins out there with the same functionality, but I chose this one.
I edited the plugin heavily to get it to work how I want it to work.
Related
Hello Friends I was Developing an website which i only want to be viewed by Indian (People of india) , and I Want to Get The Two Digit Country Code for that using php. I browsed to http://php.net and tried using geoip_country_code_by_name , geoip_country_code3_by_name and geoip_country_name_by_name but None of Function worked , I have tried on my Existing XAMPP Installation and W3schools PHP runner but it says function not exists and i also have checked to PHP version. What Should i Do. I also Have tried methods form here and after Google(ing) whole day i finally came to ask here .Feel Free to Suggest Edit or Close this Question
Based on some research, the best way seems to be by IP. This link will help you if you go this way.
https://stackoverflow.com/a/13600004/13604954
But some VPN can easily change is on IP.
ref. https://nordvpn.com/blog/vpn-ip-location-changer/
So good luck! 😉
The easiest way will be to asking the user is country and if not what you want, just show another page.
I need to search details. I have written the code for searching ie, the textbox and search button is written in the homepage as well as the "search_result.php".
Pagination without searching is working well. the searching also is working without pagination.
So I guess if the search value from the homepage is stored in the session then may be I'll get that with pagination.
If there is something more. please help me.. :(
You haven't share code so am in dark what your actually doing or whats wrong.
But there is alternative.
I guess you should try: https://datatables.net/
You does not have to worry about the search results and pagination. datatables takes care of it.
Although datatable in this example fetch all records at once, that may affect on performance if your working with large no of records,
in that case go for : https://datatables.net/examples/data_sources/ajax.html
Let me know if it works for you.
First of all I would like to tell you that I am not sure if I use the terms correctly so please excuse me for any misunderstandings. I will try to clear everything.
What I want to do is to let the users on my website to select their favorite bar or restaurant and add it to their profile.
It should be more or less like maps.google.com but in a smaller dimensions let's say 400x400. The users will be able to search for a place and once they find it they will be able to save it to their profile.
I am confused though because Google offers the Google Maps and the Google Places. I do not see any tutorials around regarding Google Places..
The question is.. Can I do my small project by using google maps or I really need to use google places?
Is there any tutorial/link which shows how to store on my database the current map location?
Thanks in advance!
Ok after some more searching I found my answer which was pretty simple.
It looks like I can get the lat and lng from place.geometry.location .
The rest about storing it to the database is easy!
Thanks anyone who at least read my post!
Cheers!
I'm creating a small car dealership website, and on my inventory page I need to be able to list all the cars I have , and a way to narrow them down.
Whats the best what to achieve this? The simpler way the better even if i need to do abit more work.
I thought each car entry has to be an element with specific name and than I would use the navigation to list the element by selected name. But im not sure where to start with this. Cant seem to find any good tutorial. However been what it is i feel like there should be tons of solution for my problem..
Basically each element needs to have title , description and a picture. Please point me in the right direction, a database perhaps? I could do abit of mysql but nothing pass the beginner levels
well, i will suggest you to use any shopping cart or any e-commerce solution which will be available free of cost and you can make tweaks when you get the knowledge about these stuff.
i will suggest you to use "Wordpress + WP-E-Commerce" you just need to install the wordpress, you can create your own theme or can find a good theme while wp-ecommerce is also having free version which will solve your all problems you stated above.
feel free to ask me if you have any other question
Is there any special parameter that i can pass to search url to sort it by date .
And is there any parameter to increase the number of search results returned ?
Thanks
WordPress search is already sorted by date, most recent first. If that's not what you're looking for, you're out of luck without using plugins and/or editing source code. So no, (taking a guess here) you can't pass URL parameters to a search on a 3rd party WordPress site to change the info you get back.
This quote from Joost de Valk, one of the leading WordPress gurus out there, from his site yoast.com
WordPress default search kinda sucks. It sorts the results by date, newest first, and interface wise it doesn't have any of the cool things we're used to when we search in for instance Google.
That article is mainly on how to improve the search functionality of your own site.
I've made some modifications on the Search Unleashed plugin, it's the best one I've found and is pretty customizable
I believe this plugin will allow you to sort by date: http://wordpress.org/extend/plugins/search/
Hope it helps!