[Hook] Making map Responsive
-
Hi,
First, thanks for the plugin!
I’m not really asking for support, but sharing a trick I use to make the map responsive for a website I’m building:Add this to functions.php in a (child) theme or plugin:
add_filter( 'bgmp_clean-map-shortcode-arguments-return', 'overide_BGMP_arguments', 100 ); function overide_BGMP_arguments( $params ) { if( $params['mapWidth'] == '100' ) { $params['mapWidth'] = "100%"; } return $params; }Then when you insert a map, choose ‘100’ for the width.
Voilà.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘[Hook] Making map Responsive’ is closed to new replies.