Single Image Display template link
-
I need to edit the link which is displayed when a single attachment is being displayed – but I don’t know where this link is put together!
Let me explain..
I have a Blog post which has several attachments (images):
[URL=http://img297.imagevenue.com/img.php?image=524310877_blog_post_122_374lo.jpg][IMG]http://img297.imagevenue.com/loc374/th_524310877_blog_post_122_374lo.jpg[/IMG][/URL]I managed to edit the code so every image links to a page where the image itself is displayed:
[URL=http://img253.imagevenue.com/img.php?image=524307982_blog_attach_122_459lo.jpg][IMG]http://img253.imagevenue.com/loc459/th_524307982_blog_attach_122_459lo.jpg[/IMG][/URL]Now the question for me is, how or where do I find the code which is used to create the last link, that is being opened when I click on this single image (and which leads to the upload folder and the image itself):
[URL=http://img264.imagevenue.com/img.php?image=524308907_blog_attach_linksto_122_483lo.jpg][IMG]http://img264.imagevenue.com/loc483/th_524308907_blog_attach_linksto_122_483lo.jpg[/IMG][/URL]I need to edit this behavior, so it still displays the image from upload folder, but links to an external side.
I can’t find where the imagelink is being created. I got as far as
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
Which is the part that displays the image, bvut I can’t find the_content function.
Besides, the code which is used to create the attachment links to each single image looks like this:
<?php echo '<a class="postImg" href="' . get_permalink( $attachment->ID ) . '" title="' . esc_attr( sprintf( __( 'View' ), $att_title ) ) . '" rel="permalink">'; ?> <img width="<?php echo $image_attributes[1] ?>" height="<?php echo $image_attributes[2] ?>" src="<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="<?php the_title(); ?>" width="280" border="0" /></a>
I am new to WordPress and pretty new to PHP, too – so please forgive my stupidness!
- The topic ‘Single Image Display template link’ is closed to new replies.