• Hi there

    Let me apologise in advance for my poor knowledge of both php and html programming. I’m not a programmer, just a travel nut trying to make a decent website.

    Well, I’m making a new travel website, where I want to include a map of each post in the sidebar. Using markers does that trick. However, I can’t use shortcodes in the sidebar only html (through iframe). Which brings me to my (maybe stupid) question: is there a list of html codes equivalent to the shortcodes, so that I could e.g. avoid the popup by entering <iframe src=”http://www.e-travelmag.com/wp-content/plugins/leaflet-maps-marker-pro/leaflet-fullscreen.php?marker=7&#8243; height=”300″ width=”300″ openpopup=”0″></iframe>

    I’m on the verge of buying the plugin if I can just make a couple of things work!

    Thanks in advance for any help!
    // Maj-Britt

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Maj-Britt,

    thanks for your interest in our plugins!

    The best approach would be of course to use shortcodes in widgets – if your theme does not support this out of the box, you can add a one-liner to the file functions.php in your theme – see https://digwp.com/2010/03/shortcodes-in-widgets/ for more details.

    Regarding avoiding open popups: by default the popup status is set by editing the marker ID 7 in this case – ticking or unticking the option “open popup”. This setting will be used each time the related shortcode is processed or if the fullscreen link is shown. The pro version offers an advanced shortcode api which allows you to override map settings by e.g. adding openpopup=”0″ to the shortcode. See https://www.mapsmarker.com/shortcode-api for full reference.
    Anyway these additional attributes do not work for link to fullscreen maps as stated in the example you gave. So my suggested approach would be to enable shortcode support for widgets and then use shortcode attributes to overwrite the popup status if needed.


    Thread Starter eutravelmag


    Hi again Robert and thank you so much for your help!

    I understand what you are telling me, and I would prefer to use shortcodes in order to gain full control.
    However, I am using “Custom Fields” on my posts to be able to show information (like a map) unique to that post in the sidebar.
    I can’t seem to find any php code that I can add to functions.php in order to enable shortcodes for Custom Fields. I’ve been ‘trial-and-error’ing for the last 3 hours now…

    What I’m trying to do is for each post, like “Crash course in Burgundian wine” to show a map in my right sidebar, where the marker I have created “Burgundian wine” is shown.

    I CAN get it to work in a text widget: [mapsmarker marker=”7″] after adding the code you recommended in functions.php, but the text widget is general for my whole site, and I need to display a unique marker in every unique post.

    I hope I’m explaining properly, what I’m trying to achieve and my problems getting there..

    Any suggestions would be enormously greatly appreciated!

    // Maj-Britt

    Thread Starter eutravelmag


    After 4 hours of debugging, I found that I could enter the following code in my php widget and get the shortcut to work (for Custom Fields): <?php echo do_shortcode(get_post_meta(get_the_ID(), ‘post_map’, true)); ?>
    where “post_map” is the name of my Custom Field.

    So no reason to waste any of your time on this. Thanx again 🙂

    // Maj-Britt

    great to hear that you found a solution!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Codes for HTML view’ is closed to new replies.