Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Open the /js/wpsl-gmap.js file and search for ‘function createInfoWindowHtml’.

    At the top you of that function you see a list with vars, add

    thumb = infoWindowData.thumb,
    storeImg = ""

    Below the var list add this:

    if ( ( typeof( thumb ) !== "undefined" ) && ( thumb !== "" ) ) {
       storeImg = "<img class='wpsl-store-thumb' src='" + thumb + "' width='48' height='48'  alt='" + infoWindowData.store + "' />";
    }

    That will make the thumbnail image accessible through storeImg. You can then add the storeImg for example to the storeHeader ( if you want to show the thumbnail next to the header.

    storeHeader = storeImg + "<a " + newWindow + " href='" + infoWindowData.url + "'><strong>" + infoWindowData.store + "</strong></a>";

    I didn’t test the code, but it should work ??

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You will lose the changes once you update, but with the upcoming 2.0 update you can change the templates through a filter. So that way you will never lose any modifications after an update.

    Thread Starter Gene

    (@gene158)

    Hi Tijmen,

    Thanks for the quick response and code snippet. I’ll test it out. Looking forward to the 2.0 update, exciting!

    Thread Starter Gene

    (@gene158)

    Thanks, working great! Much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Include Thumbnail or Images in Info Window’ is closed to new replies.