WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Sidebar Widget - How to link page page anot not the image (6 posts)

  1. phattrance
    Member
    Posted 5 years ago #

    Im using the Nextgen sidebar widget and wonder if its possible to link the images back to the image page instead of a direct link to the image?

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

  2. kwbridge
    Member
    Posted 5 years ago #

    I don't know of a way to this with a widget. And getting NextGen to link to an post or page rather than the images is a bit of work. You need to use the NextGen Custom Fields plugin and tweak the NextGen plugins.

    I wrote two articles about this

    http://www.kimwoodbridge.com/how-to-link-nextgen-gallery-images-to-an-individual-page-or-post-in-wordpress/

  3. imagixel
    Member
    Posted 5 years ago #

    Have you tried this widget?

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

    I'm using it and does the job after you define a page link in the gallery settings. Actually you can define a default page for all thumbnails.

  4. grumbirky
    Member
    Posted 4 years ago #

    Hello, I too am trying to figure out a way to get the widget images to link to their corresponding image page.
    I think it's a little odd how this isn't provided as a standard option.

    The Custom Fields workaround might work, but having to input a link on each image seems rather static and laborious, unless there's a way to add the link dynamically..?

    The other widget plugin, the Sidebar Widget, is good for listing galleries, but I don't see a way to replicate the random and recent images that the original widget outputs.

    Any more ideas anyone?

  5. grumbirky
    Member
    Posted 4 years ago #

  6. withersdavis
    Member
    Posted 4 years ago #

    If it is a static page there is a pretty easy fix.

    Open up /nextgen-gallery/widgets/widgets.php.

    Edit the line (currently 322) that says

    //TODO:For mixed portrait/landscape it's better to use only the height setting, if widht is 0 or vice versa
    $out = '<a href="' . $image->imageURL . '" title="' . $description . '" ' . $thumbcode .'>';

    And replace the $image->imageURL with your URL (in quotes).

    So it becomes
    '<a href="' . 'YOUR URL HERE'. '" title="' . $description . '" ' . $thumbcode .'>';

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.