• I’d like the images to be linked to their respective attachment pages and not directly to the images. Don’t see an option for this in the option page and I’d rather not modify the plugin directly.

    Am I missing the option or is this something that can be added?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same issue!

    Otherwise this plugin would be perfect for my use… I tried to mess around in the code but I’m only a php beginner, so no success.

    Thread Starter tgiokdi

    (@tgiokdi)

    I’ve modified the plugin myself:

    I replaced line 134-139 with this:

    			$link = $info[0];
    			$link2 = get_attachment_link($mid);
    			$title = get_post_field('post_excerpt', $mid);
    			$title_esc = htmlentities($title, ENT_COMPAT, 'UTF-8');
    			$a_title = $captions == 'title' ? "title=\"$title_esc\"" : '';
    			$img = wp_get_attachment_image($mid, $size);
    			echo "<a class=\"rgg-a\" rel=\"$rel\" href=\"$link2\" $a_title>";

    Of note is the addition of
    $link2 = get_attachment_link($mid);
    and editing the linked function in the href from “$link” to “$link2”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘RGG is lInking to images, not to attachment page’ is closed to new replies.