WordPress.org

Ready to get started?Download WordPress

Forums

Basic Google Maps Placemarks
[resolved] How to open the placemark URL in the info window (6 posts)

  1. yzqiang
    Member
    Posted 1 year ago #

    Placemark info shows the same content as placemark post. To have the users accessible to the placemark post, I have to add a link in the post content which shows in the info window. But I think it's a stupid idea.
    If the placemark post link can be added directly in the info window, it will be much easier. Do you think this feature is useful?

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

  2. yzqiang
    Member
    Posted 1 year ago #

    I want to add a URL on the info window title link to the BGMP post. I think it's not a hard work. What should I do with PHP in function.php file?
    Please tell me.

  3. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    So, you want a permalink to the single post (e.g., http://example.com/placemarks/kylies-pizza) automatically added to the information window that pops up when the user clicks on a marker?

    You can use the bgmp_get-map-placemarks-return filter to modify the placemarks before they're output. See http://pastebin.com/693y379h for an example.

  4. yzqiang
    Member
    Posted 1 year ago #

    I have tried, the code works perfect. Thanks.

  5. Willem-Siebe
    Member
    Posted 1 year ago #

    Looks like something I also want (see my other post), but I'm not sure where to put this code. I do have een functions.php in my theme, do I have to add the code there?

    Kind regards Willem

  6. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Siebje. The best place to put code that extends or modifies plugin behavior is inside a functionality plugin. You can also put it in your theme's functions.php file, but you'll lose the changes if you update the theme or switch to a new theme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic