• Reference URL: https://www.swiggy.com/

    Hi Team, I want Locate Me button in my website (Like the reference website). So that when user clicks on that button share geo location popup should appear. On load share location popup should not appear. Please help me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    You can do this by first creating a custom template, then in the template you have to add the button you want to use. But you have to set a class on the button called ‘wpsl-icon-direction’.

    If you click on it, then the JS code will pick it up and make the geolocation run.

    Thread Starter pareshmithra

    (@pareshmithra)

    I tried doing it. But not happening. Can you please share custom template with the button added.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    If I add this code to a custom template, then it works for me.

    
    $output .= "\t\t\t" . '<button class="wpsl-icon-direction">Locate me</button>';
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Get share Geo location popup by clicking a button’ is closed to new replies.