Support » Plugin: Advanced Custom Fields: Leaflet Field » Don't show the map.

Viewing 1 replies (of 1 total)
  • Plugin Author jensnilsson

    (@jensnilsson)

    Hello santiagobf!

    What does $mapa contain in this case? Based on the code you posted it seems to be empty.

    The correct way is to call the_leaflet_field(); with the field name as only argument if you want to render the map that is attached to the current page/post. Like this: the_leaflet_field( 'field_name' ); or optionally, if you want to render a map that is attached to any other post: the_leaflet_field( 'field_name', $id );, where $id contains the post-id of a post that has a leaflet map attached.

    Please verify that $mapa is a string representing the correct field name and that the page currently being rendered is a post with an id.

    global $post;
    echo $post->ID;
Viewing 1 replies (of 1 total)
  • The topic ‘Don't show the map.’ is closed to new replies.