Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created May 6, 2015 07:05
Show Gist options
  • Save eri-trabiccolo/2d87749557701c7e6fcb to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/2d87749557701c7e6fcb to your computer and use it in GitHub Desktop.
Add wp flexible map before below the header in a Customizr page
add_action('__after_header', 'my_map', 20);
function my_map(){
/* use page slug or name or id */
if ( ! is_page('sample-page') )
return;
/* Shortcode example from https://wordpress.org/plugins/wp-flexible-map/installation/ */
$map = '[flexiblemap center="-34.916721,138.828878" width="100%" height="400px" zoom="9" title="Adelaide Hills" description="The Adelaide Hills are repleat with wineries."]';
echo do_shortcode($map);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment