Leaflet Maps Marker Shortcode

Below, you’ll find a detailed guide on how to add the Leaflet Maps Marker Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Leaflet Maps Marker Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Leaflet Maps Marker Plugin and the shortcodes it provides:

Plugin Icon
Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)

"Leaflet Maps Marker is an essential plugin for WordPress that integrates Google Maps, OpenStreetMap, and Bing Maps. Enhance your website's functionality by providing detailed, interactive maps."

★★★★☆ (244) Active Installs: 10000+ Tested with: 6.2.3 PHP Version: 5.3
Included Shortcodes:
  • [lmm_showmap]

Leaflet Maps Marker [lmm_showmap] Shortcode

The Leaflet Maps Marker shortcode is a tool that integrates map functionality into your WordPress site. This shortcode allows you to display a specific map on your webpage. It calls the ‘lmm_showmap’ function which in turn requires the ‘showmap.php’ file. This file contains the necessary code to render the map.

Shortcode: [lmm_showmap]

Examples and Usage

Basic example – The following shortcode displays a map using the default settings configured in the plugin options. The map output is determined by the ‘showmap.php’ file.

[lmm_showmap /]

PHP Function Code

In case you have difficulties debugging what causing issues with [lmm_showmap] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode($lmm_options['shortcode'], array(&$this, 'lmm_showmap'));

Shortcode PHP function:

function lmm_showmap($atts) {
		require('inc' . DIRECTORY_SEPARATOR . 'showmap.php');
		return $lmm_out;
	}

Code file location:

leaflet-maps-marker/leaflet-maps-marker/leaflet-maps-marker.php

Conclusion

Now that you’ve learned how to embed the Leaflet Maps Marker Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *