WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] Remove br from around thumbnail (5 posts)

  1. puregraphx
    Member
    Posted 3 years ago #

    Around every thumbnail in a nggallery there are 2 obsolete 'br' . I've looked for 3 hours but can't find the origin of the 'br'. Are they hardcoded, placed there by a function of by jQuery??
    When I remove the 'a href' from around the 'img', the 2 disappear. Can anybody help, i'm getting desperate. When I replace the 'img' by text, the remain. I've done a complete search in the NextGen folder for .wrap(), .before(), .after() and , no results. Please help, this is urgent as the deadline for this site approaches.

    Live example: http://gm-productions.be.apache09.hostbasket.com/standenbouw/modulaire-stand-met-profielen/?show=gallery

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. puregraphx
    Member
    Posted 3 years ago #

    The extra line breaks are due to the AWAKE WordPress theme I purchased.

  3. puregraphx
    Member
    Posted 3 years ago #

    Correction, I've resolved the error in the NextGen gallery plugin file /view/gallery.php line 42. You should place all PHP code on one line, otherwise, WP wil insert an 'br'.

  4. BimCreate
    Member
    Posted 3 years ago #

    which code are you referring to?

  5. greencode
    Member
    Posted 2 years ago #

    Thanks @puregraphx - I was having the same issue.

    Changing the following code in /view/gallery.php

    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    				<?php if ( !$image->hidden ) { ?>
    				<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    				<?php } ?>
    			</a>

    to this

    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> ><?php if ( !$image->hidden ) { ?><img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /><?php } ?></a>

    Resolved the issue by removing the break tags that WordPress decides to insert.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic