Created
May 6, 2015 07:05
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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