Forum: Nearby Posts

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Nearby Posts premium extension please open a new premium support ticket.

[Resolved]Can I update location every time i load a page?

Forums Nearby Posts Can I update location every time i load a page?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #30479

    (first of all, sorry for my english)
    I’m creating a city guide and I need to update user loaction when he loads a new page.
    I’m using “Nearby Post” to display a list of monuments near user, and I want to show real distances, but it seems plugin remember the first location it uses.

    Any suggestions?



    Thank you Daniele for the purchase.
    The plugin uses the location saved in the cookies which is also the location that the user enters in the “Current Location” widget.
    The plugin will need to be modified a bit in order to make a location check on each page load. However, the user needs to be asked for a permission to get his location every time which can be inconvenience.
    What you can probably do is add a short script ( I can help you with that ) that will delete the cookies which hold the user’s location every 15 or 30 minutes for example so he won’t be asked for his location very often.


    I really Appreciate your reply, and your help too 🙂

    Yes, I think your idea of a short script is good!


    Or, can I add a button to manually update position?
    I dont’ understand if it’s possible at this time.
    (both solutions are better)


    Yes. Are you aware of the “Current Location” widget that comes with GEO my WP.
    The widget adds a button for the user to add his current location. And the Nearby Posts plugin displays posts based on that location that the use enters.
    If you go to your Widgets page in the admin you should see the widget there.


    I’m sorry, I had not seen the update function and i thought that it only printed last saved position.
    So, if you could help me with the “short script” that you’ve suggested before, it would be perfect.

    Thanks in advance 🙂


    Hi Daniela,
    please go to the “Settings” page of GEO my WP ( dashboard -> GEO my WP -> Settings ) and under the “features” tab check the “Current Location Shortcode/widget” checkbox.
    When done so go back to the Widgets page in your dashboard and you will see “GMW Current Location” widget.

    Using this widget visitors of your site can update there location manually or automatically.


    Was the short script to clear a user’s location and only hold for 15-30 minutes ever created? I have the same issue of needing to find a user’s location on every pageload instead of storing in a cookie for 24 hours.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.