Viewing 11 replies - 1 through 11 (of 11 total)
  • You can link the thumbnail to the image in the image gallery, just click on “Insert Image” then click “Gallery” select the image you want to work with.

    Then you can select the Link URL, the choices are “None”, “File URL”(links to image), and “Post URL(links to post).

    You can also set the default, by scrolling down to “Gallery Settings”.

    The choices for “Link Thumbnails To” are “Image File” and “Attachment Page”.

    Thread Starter lukewilde

    (@lukewilde)

    Not sure how that would work for me, i need a code like the_permalink(); but instead of the post link i need it to get the image’s link which has been posted in that post

    Why?

    Are you trying to write a dynamic script to place images from a post into a gallery or something like that?

    Thread Starter lukewilde

    (@lukewilde)

    http://lsw-design.com/tf/darkgreen/?page_id=9

    I basically want those thumbnails to link to the larger image so that i can use lightbox/prettyphoto on them.

    Then you need “File URL” that way your thumbnails will be linked to the larger image, and when you click on the thumbnails the larger image will load.

    I’m not familiar with lightbox/prettyphoto, so all I can say is just try what I’ve suggested and see if it works with L/P.

    Thread Starter lukewilde

    (@lukewilde)

    What would the code for that be? Can’t find it in the codex

    Hi,

    I am also trying to do this and have had no luck.

    I have tried this: <a class="fancybox" title="<?php the_title(); ?>" href="<?php $image = wp_get_attachment_image_src( none ); ?>"><?php the_post_thumbnail( 'artwork-thumbnail' ); ?></a>

    But all I get is fancybox loading a screenshot of the homepage??

    Please help!

    @welshhuw

    Have you tried fancybox" title="<?php the_title(); ?>" href="<?php $image = wp_get_attachment_image_src(0); ?>"><?php the_post_thumbnail( 'artwork-thumbnail' ); ?></a>

    @fishdogfish

    That didn’t work either??

    I’ve even tried creating a new thumbnail, that is very large and using that php snippet, still only loads a homepage screenshot.

    I had the same problem and fixed it with this code:

    $atturl = wp_get_attachment_url(get_post_thumbnail_id());
    echo preg_replace('/-e[0-9]{13}/', '', $atturl);

    Good luck!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Getting original image link’ is closed to new replies.