Support › Meta Box Geolocation › Display Google Maps on Oxygen Builder RepeaterResolved
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:
$args = [
'width' => '100%',
'height' => '250px',
'zoom' => 14,
rwmb_the_value( 'mapa', $args );
It's not displaying.
Here is the front end page:
Any idea why and how to make it work?
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/
I tried using the code you instructed but didn't work, see image below:
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.
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?
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.