Support » Plugins » NextGEN Gallery – edit link of photo to specific post?

  • Hi,

    I’m all fairly new to this so sorry if my question seems a little simple!

    I’ve created a gallery and have inserted into a new page. When I click on one of the thumbnails it takes me to the photo location.

    Is there a way, instead of taking me to the photo location, can I link a post to the photo?

    Any ideas would be most grateful!

Viewing 15 replies - 1 through 15 (of 24 total)
  • I have just added nextgen gallery and have wondered the same thing.
    Is there a way of linking an image to a specific post?

    I am starting to examine the code also… I’d like that instead of taking me to the photo location, it would take me to the Photo single page where visitors can comment over it…

    Anyway?… any of you have managed to get the effect working? It redirects me right to the image url and doesn’t open inside the browser as I’ve seen in all the example pages…

    It’s all inside nggfunctions.php, currently it’s not possible by default

    i have been trying to do the same thing and searching all over the net for a plugin that will do it.

    I have a slideshow of house pics. When a visitor clicks i want the link to go to a detailed page of the property. HOW DO I DO THIS???

    Please help

    I have the same question about linking to a specific page. I am using nextgen to display screen shots of photoblogs and would like to have the ability to link gallery image to specific website. I see where you state “It’s all inside nggfunctions.php”…which is fine if I knew what I was doing. If someone could shed a little light how to do this, within the php file, it would be much appreciated.

    HI anyone? no ideas?
    I m using pot thumb revised to do that, but i really would like to use just nextgen, its much better in my opnion…
    Please someone can teach how to change the link to the post instead the picture?
    Thanks to all anyway 🙂
    and best regards from joao (Brazil)


    What do you mean by ‘pot thumb’? Is this a plugin or something that is editable?



    I’d like to say that trick is just a logical game, no particular php skills are required.

    As a foreword, I found some posts near here an infuriated guy giving me reprimands on forum protocol, while I was expecting to some cool feedback, so I let he reconsiders different ways to adress to strangers and I post it here.

    You can use this trick to obtain, in NextGen Gallery, some of the thumbnails of your choice link to an URL : a post, a page, a file to download, whatever.

    1- Extract a copy of NextGen to your Desktop.

    2- Open the nggfunctions.php

    3- Go to line 338.

    4- There you have by default:

    // choose link between imagebrowser or effect
    $link = ($ngg_options['galImgBrowser']) ? $nggRewrite->get_permalink(array('pid'=>$picture->pid)) : $folder_url.$picture->filename

    Take a look at the end of the phrase. $folder_url.$picture->filename
    That will displays your thumbs, towards its full size. The code is telling the thumbnail that its final URL be the images path $folder_url. plus the filename , which convokes the concrete image.

    Erase one and other and let just $picture-> .

    5- now, add ” alttext ” at the end:

    // choose link between imagebrowser or effect
    $link = ($ngg_options['galImgBrowser']) ? $nggRewrite->get_permalink(array('pid'=>$picture->pid)) : $picture->alttext;

    That will display later in your Admin Panel whatever in the Alt & Title Text field be written, e.g. an URL. Maybe if you write ‘Andromeda’ a cosmic gate opens in your screen.

    6- Save it.

    7- To prevent later your thumbnail shows the typical alt text as a weird URL when you place your mouse over the image, go to line 348.

    There you have:

    $out .= '<img title="'.stripslashes($picture->alttext).'" alt="'.stripslashes($picture->alttext).'" src="'.$thumbnailURL.$thumb_prefix.$picture->filename.'" '.$thumbsize.' />';

    Remove the code '.stripslashes($picture->alttext).'
    Be careful with every little comma.

    You must get that:

    $out .= '<img title="" alt="'.stripslashes($picture->alttext).'" src="'.$thumbnailURL.$thumb_prefix.$picture->filename.'" '.$thumbsize.' />';

    So nothing inside the title="" order.

    In IE the alt text just disappears. In Firefox, you’ll get your description showing up. Don’t ask me why. Maybe the browser search for the closer alternative.

    8- Save it, close the editor, and open your FTP.

    9- Upload just one file, this new and pretty modified nggfunctions.php, to your host, in the Next-Gen Gallery plugin directory, to overwrite the default file.

    10- go to your Admin Panel. In Gallery – Options – Gallery, select ‘show thumb description = description text’ (Update.)

    11- Go to any of your galleries. Assign like always a description for every thumbnail (its title, a paragraph, etc) and, in the alt & title field, THE URL YOU WANT TO BE LINKED.

    Check for that purpose your own pages and posts.

    Visit your site. Now it’s when all your CSS style it’s completly broken.

    I don’t know an easier way to do it.
    Tell me if that worked for you 😉

    Hi Parap, you saved my day. Thanks a lot for posting your solotution. It works fine for me – great work. best jan

    Do you know how to make the images clickable in the flash slideshow?

    The flash slideshow viewer (Image Rotator) I know allows for that.. but it requires a link to be added to each image in the XML file.. but I don’t know how to make that happen with next-gen gallery.

    Thanks so much!


    I’m interested in this too; i would like my slideshow (in my sidebar) to be clickable so that when you click on the image, you get taken to the location of that image/post.

    Did anyone else not get Parap’s solution to work?

    As an alternative, is there a way to link to a post in the description and have the description display under the preview image?

    edit: Note that I’m trying to get this to work on the sidebar. For whatever reason, there is so much additional functionality only when putting into a post. I’ll look into it in the AM

    Parap’s solution got me almost there…

    What I’m going for is a grid of images (magazine covers) that link to urls (pages hosting all the articles from each issue). Paraps solution enabled me to link each image with a webpage, but unfortunately, those webpages are coming up inside the image rotator. Is there anyway to get a direct link?

    How do you make this work in version 1.0.2? I tried doing this, but the code mentioned is not present in the newer version.

    I am trying to link a thumbnail image to a URL. I am using WP 2.7.



Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘NextGEN Gallery – edit link of photo to specific post?’ is closed to new replies.