Add new permalink to map POI infowindow

Home Forums MapPress Support Add new permalink to map POI infowindow

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #15552


    I recently purchased pro and have found it to be really easy to customize to my liking so far. One thing I’m currently stuck on is adding another link to the infowindow on a mashup mapp.

    Using the map_poi.php template I copied to my theme folder, I’ve successfully added some custom field data from the posts, but I can’t seem to get a unique permalink for each post’s infowindow. Here’s my code:

    The result right now is showing the same permalink for every poi on the map ….presumably the first post’s permalink loaded from the query maybe.

    Any ideas how to fix this so that each poi’s info window pulls the correct permalink for each specific poi ?

    Thanks for your attention



    It’s a quirk of WordPress: functions with the_ at the front require you to call setup_postdata() first to set up some global variables.

    I think the easiest thing for your template is to call get_permalink() instead. It doesn’t require that extra step, and you can call it with the postid.


    Thanks Chris. That worked, cheers.
    <a href="<?php echo get_permalink($poi->postid);?>" class="btn">More Details</a>

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.