WordPress.org

Ready to get started?Download WordPress

Forums

Geo Mashup
[resolved] WP Favorite Posts and Geo Mashup (5 posts)

  1. mariostella
    Member
    Posted 3 years ago #

    I am trying to add a favorite post link from the WP Favorite Posts plugin inside the info window generated by Geo Mashup. Clicking on the link does add the post to favorites, however also opens the iframe map in a new page. While if not clicked the link keeps on showing the rotating gif image that should be shown only between the added to favs and removed from favs (and viceversa) states of a post.

    I have searched a lot about iframes and links and also inside the code of both plugins, but I could not come up with any working solution. Is this even possible to accomplish? If yes a pointer on where to look would be appreciated. Thanks

  2. mariostella
    Member
    Posted 3 years ago #

    I found a partial solution. I modified the call of the wp favorite posts plugin link so it opens the link within the iframe, simply reloading the map. However, I cannot stop the gif from showing. It seems that a script continues running unstoppably and I cannot let it know it should stop executing. However, this seems more of a question for the wp favorite plugin dev, so I will mark this as resolved.

    For those with similar issues: you need to add a target="name" to the link. the word "name" is the name of the iframe specified in the iframe attributes. In this case it is called gm-map-2, so the iframe attribute to look for is name="gm-map-2", and your link will have target="gm-map-2"

    This works for all iframes, not only with these two plugins.

  3. Dylan Kuhn
    Member
    Plugin Author

    Posted 3 years ago #

    You can also set the name of a geo mashup frame this way:

    [geo_mashup_map name="mainmap"]

  4. mariostella
    Member
    Posted 3 years ago #

    Oh that's great to be able to control that! When I have multiple maps on the same page that is a great thing to have! Thanks!

  5. Dylan Kuhn
    Member
    Plugin Author

    Posted 3 years ago #

    Some Geo Mashup tags can be applied to a named map too:

    [geo_mashup_map name="mainmap"]
    [geo_mashup_category_legend for_map="mainmap"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic