Hello @e222w,
Thank you for appreciating the plugin.
You can add html content before of after the content using the map position from the map settings.
You can also pick custom position, and display the map using shortcode / gutenberg block
Hope this documentation helps
https://wp-mapit.chandnipatel.in/documentation/displaying-map-on-the-page/
Thread Starter
e222w
(@e222w)
Thank you for the quick feedback; Yes, I am aware of the possibilities, integrating the map is not the problem, it works wonderfully. I would like to display the map on several pages (>50) and also include (before/after) a text with a description of the map (HTML code).
You can use the shortcode / gutenberg blocks for it, you can also create a multipin map and use shortcode to display the map on the page.
If you can show the example of what you propose to do, I can provide you with a better direction.
Thread Starter
e222w
(@e222w)
Okay, thank you very much… an example to describe my problem better: A map is displayed on over 50 different pages (this works wonderfully with the shortcode). In addition, a text (HTML code) should now be displayed before/after the map on all maps. I can also put this text on every single page, but if the text should be changed, I have to change the text on all 50 pages. On the other hand, if the text was inserted with a hook before/after the map, only one change is necessary… do you know what I mean?
Thank you for explaining, I am sorry currently this is not possible with the plugin. I think you will have to write a custom shortcode for it
Thread Starter
e222w
(@e222w)
okay, thank you very much… then I’ll try to program something of my own…
-
This reply was modified 3 years, 1 month ago by
e222w.
Sure, do let me know if you need any other help.
Thread Starter
e222w
(@e222w)
This works!
function lb_append_map_description($output, $tag) {
if ( 'wp_mapit_map' !== $tag ) {
return $output;
}
return $output . '<div>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam</div>';
}
add_filter('do_shortcode_tag', 'lb_append_map_description', 10, 2);