Display Google Maps on Oxygen Builder Repeater

Support MB Geolocation Display Google Maps on Oxygen Builder RepeaterResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35720
    Fernando ArbexFernando Arbex
    Participant

    Hello there,
    I'm trying to display a google map location in the Oxygen builder but the code is not working.

    I tried on a code block with the following code:

    <?php
    $args = [
        'width'        => '100%',
        'height'       => '250px',
        'zoom'         => 14,
    ];
    rwmb_the_value( 'mapa', $args );
    ?>

    It's not displaying.
    Here is the front end page:
    https://fernandoarbex.com/teste-celula/
    Any idea why and how to make it work?

    #35723
    Long NguyenLong Nguyen
    Moderator

    Hi Fernando,

    You can use the WordPress function get_the_ID() to pass the post ID to the helper function rwmb_the_value() in the Oxygen repeater. For example:

    rwmb_the_value( 'mapa', $args, get_the_ID() );

    Read more on the documentation https://docs.metabox.io/functions/rwmb-the-value/

    #35726
    Fernando ArbexFernando Arbex
    Participant

    Hi Long,

    I tried using the code you instructed but didn't work, see image below:

    Adding get_the_ID"

    I also tried inserting the post ID direct on it, see it:
    Geting the post ID

    And using on the code:
    Using the code on Code block

    Is there anything wrong I did?

    This is a post type I created with metabox that is called celula.

    Thank you.

    #35741
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It's a weird issue. Can you please add your code to the post template file in a theme and deactivate Oxygen builder to see if it works?

    #35748
    Fernando ArbexFernando Arbex
    Participant

    Hi Long,

    I don't use a theme, only oxygen builder that disables a theme.
    I'll try to replicate in a new WP with very few plugins and see how it goes.

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