Geo location radius

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Tagged: ,

Viewing 7 reply threads
  • Author
    Posts
    • #93311
      awaludin
      Participant

      Hello, Nice plugin you have here. I wonder if it is possible to set lower radius such as 1 or 2 kilometers? The lowest from WCFM settings is 50 km radius. Thank you.

    • #93587
      WCFM Forum
      Member

      Hi,

      Sure, please add this code to your site –

      add_filter( 'wcfm_max_radius_to_search_options', function( $max_radius ) {
      	$max_radius = array( '1' => '1', '2' => '2', '5' => '5', '8' => '8', '50' => '50', '100' => '100', '150' => '150', '200' => '200', '500' => '500' );
      	return $max_radius;
      });

      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

    • #95917
      jp2019
      Participant

      In which line of code should it be inserted?

    • #96410
      WCFM Forum
      Member

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

    • #96813
      jp2019
      Participant

      It didn’t work. Could you send me where I can modify the code inside the plugin? In which file and line of the plugin code?

    • #97160
      WCFM Forum
      Member

      Kindly show me screenshot, where you have added this code.

      Well, it’s very dangerous to edit plugin’s core files, you will not able to update plugin anymore!

    • #97253
      jp2019
      Participant

      Here is an image of the code pasted.

      Attachments:
      You must be logged in to view attached files.
    • #97642
      jp2019
      Participant

      Sorry, I din’t perceive that the code automatically places the values ​​on the store administrator page…

      It’s all ok!

      Thanks for your answer

Viewing 7 reply threads
  • The topic ‘Geo location radius’ is closed to new replies.