Ready to get started?Download WordPress


NextCellent Gallery - NextGEN Legacy
Theme conflict breaks image and external links (3 posts)

  1. webbrewers
    Posted 12 months ago #

    Using this to add external links to images in gallery:
    Instead of outputting:
    <a href="url"> <img src="imgurl".../></a>
    It outputs:
    <a src="url"> <img href="imgurl"/></a>
    Ie, it mixes up href and src.
    Works fine in several other themes tested.
    Theme is themetrust's Mindful, but have got no answer from them so far.


  2. Matthew
    Posted 11 months ago #

    That is not a WordPress theme.

    Can you explain more? I don't understand.

  3. webbrewers
    Posted 11 months ago #

    I created a new template file gallery-link.php. In it I replaced the href for the thumbnail to target a custom field (with links in it) instead of the image url.
    So instead of:
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>"....
    I'm using:
    <a href="<?php echo $image->ngg_custom_fields["Link"] ?>" title="<?php echo $image->description ?>"....
    This opens whatever link I define in the link custom field rather than the full size image when the thumbnail is clicked.In this theme only, the output gets mangled, as described above - href and src are transposed.


You must log in to post.

About this Plugin

About this Topic