How to change the default search radius? (google map)

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate How to change the default search radius? (google map)

This topic contains 12 replies, has 4 voices, and was last updated by WCFM Forum WCFM Forum 2 weeks, 3 days ago.

  • Author
    Posts
  • #78739
    Avatar
    id.manage
    Participant

    Hi Guys,

    May I ask you how can I change the range of the search radius? Current one is 0 to 100km. May I change it from 0 to 5 miles?

    Thanks!

  • #79154
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Right now, this only support distance in “KM”, not in “Miles”.

    If you want to set some different range in KM, that will be possible.

    Thank You

  • #79206
    Avatar
    id.manage
    Participant

    Thank you, Please can you tell me how to changer the range in KM? Thanks

  • #79549
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    Please keep add this code to your site –

    add_filter( 'wcfmmp_radius_filter_max_distance', function( $distance ) {
    	return 500;
    });

    Well, this will work after WCFM Marketplace next update.

    Thank You

  • #79782
    Avatar
    id.manage
    Participant

    Hi Thank you.

    May I ask you when is the next update? And where shall I add this code to? The function sheet?

  • #79965
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Well, this update is already there, WCFM Marketplace 3.1.10

    Add this code to your child theme’s functions.php
    In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

    Thank You

  • #80010
    Avatar
    id.manage
    Participant

    Thank you!

  • #80022
    WCFM Forum
    WCFM Forum
    Keymaster

    Welcome 🙂

  • #83762
    Avatar
    Bernard Omolafe
    Participant

    In the UK we use miles. It would be great to have that.

  • #83969
    WCFM Forum
    WCFM Forum
    Keymaster

    Will add that option.

  • #84036
    Avatar
    Bernard Omolafe
    Participant

    Excellent thanks!!!

  • #92159
    Avatar
    villanidomenico
    Participant

    Hi try add the code with snipped but it not works or i don’t now wher it show for change the radius 0 to 5 Km

  • #93391
    WCFM Forum
    WCFM Forum
    Keymaster

    Well, we have already added this as setting option at WCFM Admin Setting -> GEO Location – https://ibb.co/8XpDDvx

    No more custom code require for the purpose.

    Thank You

You must be logged in to reply to this topic.