Forum: Kleo Geolocation

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 Kleo Geolocation premium extension please open a new premium support ticket.

[Not resolved]How to Display Member's Location in Sidebar/Widget?

Home Forums Kleo Geolocation How to Display Member's Location in Sidebar/Widget?

This topic contains 3 replies, has 2 voices, and was last updated by  Eyal Fitoussi 2 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #55395

    Jason
    Participant

    I’m creating a custom widget and I’d like to display the users location. I searched and found that it’s being stored in wppl_friends_locator?

    I tried using do_shortcode('[gmw_user_info]') but that doesn’t do anything. It would also be great if I could remove the USA at the end of it.

    thank you!

    #55403

    Eyal Fitoussi
    Keymaster

    Hello Jason,
    Assuming that you are using BuddyPress and The Members Locator add-on of GEO my WP, you should be able to display the member’s information using the shortcode [gmw_member_info].

    one of the shortcode attributes is “info” which can be any of the address fields that you’d like to display.

    so you can do something like [gmw_member_info info=”street,city,state,zipcode”] to display all the address fields except for the country.

    You should also use the “user_id” shortcode attribute to pass the member ID. However, it the widget is placed on a member’s single page ( profile page ), then the member’s ID will pass automatically to the shortcode.

    let me know if that helps.

    #55405

    Jason
    Participant

    I ended up using:

    Having the USA is fine since we hope people from other countries will join too 🙂

    great plugins as always

    thank you

    #55427

    Eyal Fitoussi
    Keymaster

    You are welcome Jason.
    Well, your solution is great as well. Note that you can as well pull the formatted_address column instead of address. The Formatted address will sometimes have more details in it including commas.

    Thanks for the feedback and happy new year.

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

You must be logged in to reply to this topic.