Custom Fields
Support Meta Box Geolocation Possible to get isolated address items for frontend display?

  • Creator
  • #9596
    Resolved Memaddog

    I am using the “Map” field with accompanying “text” field to for the address. The documentation shows how to display the map and echo the latitude, longitude, and zoom level, but it is possible to grab the “city” for example? Since the address text field is a single string of text, there doesn’t seem to be a way to echo it on the frontend with included line breaks for formatting. Is this possible or do I need separate text fields to enter the address information separately for display on the frontend?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
  • #9597
    Anh Tran


    The address field is just a text field. While it’s used to auto-suggest the map location, it acts like a normal text field. So you can just use the helper function to get its value and output it in the frontend.


    Is it possible to do this using a shortcode? Like, to display just the city for example?

    Anh Tran

    Yes, the city is just a text field and you can use [rwmb_meta] shortcode to show it:

    [rwmb_meta meta_key="city"]

    For details, please see the documentation.


    I meant if we use a single field for the auto-suggest, can the result be divided into separate parts, such as City?

    Anh Tran


    You need to create a new text field, and bind it to the city data. Please follow the documentation to know how to do that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash