WordPress.org

Ready to get started?Download WordPress

Forums

Modding a theme: thumbnail linking to large image (1 post)

  1. chrisbosse
    Member
    Posted 1 year ago #

    Ok, so I modded a theme I downloaded. The theme originally would just have a thumbnail of the image attached to a post in the post and the thumbnail was linked back to the post. I wanted the thumbnail to link to the large image. I searched online and this is the code I ended up with:

    <div class="portb-thumbb"><div class="inportb-thumbbin"> <?php if ($image !== '') { ?><a href="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?>" title="Click For Larger Image"><img src="<?php bloginfo('template_directory'); ?>/phpThumb/phpThumb.php?src=<?php echo $image; ?>&h=148&w=580&zc=1&q=100" alt="<?php the_title(); ?>" style="border:none;" /></a>

    I had 2 posts when I changed this code. The change worked on them. I went on the change settings on my site and then tried a few test posts. The new post thumbnails link back to the post, but still have the "Click For Larger Image" title. The old posts are still right. Any idea what I messed up?

    My site is christopherbosse.com

Topic Closed

This topic has been closed to new replies.

About this Topic