Hi, are you using Maps and Locations add-on? If you do then the data for radius search is in wp_mal_latlng table in your database, if you are storing it somewhere else then most likely the data will be in wp_postmeta table.
How to use it with Search and Filter Pro plugin i cannot tell i am afraid as i am not really familiar with this plugin.
Yes, I’m using Maps and Location Add-on.
I just want to use Radius Drop-down Field with my Search-filter pro plugin.
Is it possible to save that radius data in any custom field or anything and then I’ll call back that data from custom field in Search-Filter pro.
I just want to use 5 miles, 10 miles, 15 miles ….so on radius in my search/filter functionality. Hope you understood what I want to apply.
Thanks for your quick reply!
-
This reply was modified 8 years, 8 months ago by
bhupz007.
-
This reply was modified 8 years, 8 months ago by
bhupz007.
You should have the radius data (that is latitude and longitude) save in wp_postmeta with keys _adverts_mal_latitude and _adverts_mal_longitude so for example to get this data for Advert with ID 100 you would use this code
echo get_post_meta( 100, "_adverts_mal_latitude", true );
echo get_post_meta( 100, "_adverts_mal_longitude", true );
Thanks for your reply.
Can we store this radius field in any custom field and then we can able to fetch that field?
If possible, please send the code for the same.
Thanks & Regards,
If you would like to change the name _adverts_mal_latitude to something else then i am afraid this is not possible.
No, I don’t want to change the name_advert_mal_latitude.
I just want to save the radius field in custom field because I want to show the radius field on front-end.
Is it possible to further save the radius field in any custom field.
Thanks for your reply.
What do you mean by radius? That is what value you would want to have saved in the database?
The Radius means 5 miles, 10 miles, 25 miles, 50 miles.
These are the values I want to saved in the database or any custom field so that I can use in my search-filter functionality.
At the moment, I have not found any table where I can see this radius value.
This is not possible with WPAdverts, also to me it seems that this does not make much sense if you save in wp_postmeta value “5 miles” then this is “5 miles” from what? If you want to use this data to do a search by radius then you need to store longitude and latitude only then you will be able to search by radius.