The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Gallery Image Attachment Page (3 posts)

  1. bec7utd
    Posted 4 years ago #


    I really like thumbnails that link to an attachment page, but once at the attachment page I'd like it if clicking the image led to the image file. As is currently, clicking the attachment page image cycles through to the next gallery image. Give it a try here and see what I mean:

    Is there a setting somewhere in WordPress or Weaver II that I change to get the desired affect?


  2. esmi
    Forum Moderator
    Posted 4 years ago #

    When inserting a gallery, you are given the option to Link thumbnails to an Image File or an Attachment Page. Choose Image file.

  3. headwes
    Posted 3 years ago #

    I ran into the same issue. It was resolved by changing wp-includes/image.php. In my case, I changed

    if ( count( $attachments ) > 1 ) {


    if ( count( $attachments ) < 1 ) {

    Of course, there are never < 1 attachments, so it will return false and instead of linking to the next image it will just link to the full size version of the current image.

Topic Closed

This topic has been closed to new replies.

About this Topic