Show div id="map" from gutenberg

Support MB Geolocation Show div id="map" from gutenbergResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36789
    proyectohappyweb@gmail.com[email protected]
    Participant

    Hello,

    I'm trying to insert the map with the listing post in my archive page like this tutorial:
    https://metabox.io/display-all-listings-on-a-map/

    I have managed to do it by editing the file archive.php and inserting the code:
    <div id="map" style="width: 100%; height: 600px"></div>

    But it is not really what I need, since I am overriding the layout file from my theme, and I want to put two columns, in the first column the list of posts, and in the second column the map.

    To do this, I have created a shortcode that I put in the second column that returns the code for the map to appear:
    <div id="map" style="width: 100%; height: 600px"></div>

    but the space that the blank map would occupy appears to me and the map does not appear...

    For the template i am using gutenberg.

    Do you know how I could make the map appear?

    Thanks!!

    #36793
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Did you implement other code snippets on your site (enqueue script, JS code)? You can also use the block Custom HTML in the block editor to add the HTML code instead of using another shortcode.
    If it still does not work, please share your site URL, I will help you to check the issue on your site.

    #36875
    proyectohappyweb@gmail.com[email protected]
    Participant

    Perfect, many thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.