• The leaflet map is displayed correctly (width 100%, height 450), but is followed by many lines of blank space.

    A previous answer on the same topic recommended adding the function:
    remove_filter(‘the_content’, ‘wpautop’);
    add_filter(‘the_content’, ‘wpautop’, 99);
    add_filter(‘the_content’, ‘shortcode_unautop’, 100);

    I did so, but get the same result. However, the problem is resolved if the function is just:
    remove_filter(‘the_content’, ‘wpautop’);

    Can someone explain the significance of the add_filter lines?
    Could their absence have any unintended consequences?

    Andy

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor hupe13

    (@hupe13)

    If you work with the standard editor, use the code editor to see the source code and remove any empty <p></p>. In the shortcode block remove any breaks.
    (Same problem as here.)

    Thread Starter andynz

    (@andynz)

    Thanks for the tip.
    The leaflet map was coded with each short-code on a new line:
    [leaflet-map zoom=”5″ height=”450″ lat=-40.83824 lng=173.7252058]
    [leaflet-marker lat=-37.72 lng=175.12]Auckland [/leaflet-marker]
    [leaflet-marker lat=-41.21 lng=175.47]Wellington [/leaflet-marker]
    etc
    The solution was to code them as a continuous text stream.

    Andy
    `

    Hello,

    I was the one who asked in the Leaflet Extensions support linked above. I was not able to find any empty <p></p> so was clueless about this. I just tested the continuous stream and confirm it solves the issue. Thank you for sharing that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Whitespace below map’ is closed to new replies.