• Resolved bhupz007

    (@bhupz007)


    Hi Greg,

    Hope you are good of your health.
    I want to show radius dropdown for my filter functionality (I’m using search-filter pro).
    Can you please help me where I can find this radius dropdown data in my database or just tell me the solution for the same like- save the radius dropdown field in any custom field and fetch that custom field form database?
    Hope you will come with any solution.
    Looking for the quick reply.

    Regards,

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    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.

    Thread Starter bhupz007

    (@bhupz007)

    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 7 years, 4 months ago by bhupz007.
    • This reply was modified 7 years, 4 months ago by bhupz007.
    Plugin Author Greg Winiarski

    (@gwin)

    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 );
    
    Thread Starter bhupz007

    (@bhupz007)

    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,

    Plugin Author Greg Winiarski

    (@gwin)

    If you would like to change the name _adverts_mal_latitude to something else then i am afraid this is not possible.

    Thread Starter bhupz007

    (@bhupz007)

    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.

    Plugin Author Greg Winiarski

    (@gwin)

    What do you mean by radius? That is what value you would want to have saved in the database?

    Thread Starter bhupz007

    (@bhupz007)

    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.

    Plugin Author Greg Winiarski

    (@gwin)

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Radius Field Database’ is closed to new replies.