Gallery writing two (3 posts)

  1. eassae
    Posted 5 years ago #


    I am using the gallery to insert a grid of images. The problem I am having is that when the end row of the gallery has 5 images in a five row gallery wordpress inserts two <br style='clear: both;' /> tags at the end of the list which is giving me an extra line break that I don't want.

    If anyone has ideas on what I may be doing wrong, known issues, hacks, etc... Let me know.


  2. eassae
    Posted 5 years ago #

    The problem seems to be in the media.php line 861

    if ( $columns > 0 && ++$i % $columns == 0 )
    			$output .= '<br style="clear: both" />';

    If I delete <br style="clear: both" /> in line 861 everything works fine.

    I am by no means a php expert so I don't really know what I am doing by removing this part of the code.

    So if someone could give me an explanation on why this might be necessary it would be greatly appreciated.

  3. topherez
    Posted 5 years ago #

    The problem is actually a few lines below. Just replace lines 871-873 with the following:

    $output .= "</div>\n";

    So, you are removing the extra break that is appended to the "$output" var at the end of the loop.

Topic Closed

This topic has been closed to new replies.

About this Topic