Viewing 5 replies - 1 through 5 (of 5 total)
  • Hmm, never really tested what would happen if you would include multiple maps in blog excerpts on the homepage like you did. What are the shortcodes you used on both pages?

    Thread Starter sardonic-wit

    (@sardonic-wit)

    Thank you so much for the response; your plugin has been a wonderful, impressive, and simple feature that works very well. I have been most pleased with it.

    To your point, all of my maps are under the ‘Custom Content’ option. I would provide the location, dates, and a little blurb in the description.

    Furthermore, I have been using Nomad Maps as an interesting feature to show different legs of my travels that I would thoroughly discuss in my posts. They have been working, but I believe on Saturday evening for some reason the one map started to act differently, hence the slight dilemma: if I click on the post and read it in full the problem does not present itself. Also, if you go to the second page of posts on the home page, you can see another map for another entry and that one also seems to work fine. It just seems this one particular shortcode is causing problems.

    Shortcodes:
    Bavarian Monks >> [nwm_map zoom=”6″ id=”6″]
    Three Places in One Day ((with the problem)) >> [nwm_map zoom=”5″ id=”3″]
    Cultural Barriers >> [nwm_map id=”4″]

    In addition, I have used two separate maps in a single page and they seem to work swimmingly, refer to this link: https://sardonic-wit.net/blog/travel-maps/

    Shortcodes:
    [nwm_map id=”2″]
    [nwm_map id=”1″]

    I hope this information can be helpful.

    Thread Starter sardonic-wit

    (@sardonic-wit)

    I think I found out where the problem originates. I did a bit of a test, taking from your earlier statement about having more than one map in blog excerpt, and I was able to replicate the problem.

    The Problem: A blog index/home page cannot have more than one map residing in the same page. If the entries are across other pages of the blog home page, then the maps are fine.

    Conversely, more than one map residing in the same post/page also have no problems. It has something to do with different posts having the same function showing up in the same page.

    It’s a peculiar predicament.

    The issue here is that once the page is loaded an outer div id is added to apply the styles to the map. This needs to be an ID to prevent themes from overwriting it, and ID’s need to be unique so can only exist once.

    This ID wrap is added when an map with id 0 is found ( this does not match with the map ids in the admin area ), and then the map area is wrapped in the div. The problem with excerpts is that the consists of multiple block, and only the first one is wrapped. So the ID only exists for that part, and that’s why only there the map looks good.

    Need to think of a fix for this, that won’t break in other situations.

    Thread Starter sardonic-wit

    (@sardonic-wit)

    I understand that this issue has not been a priority for the plugin, but have you been able to find a fix for this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Skewed Map on Home Page’ is closed to new replies.