Thumbnail links to full size (remove attachment link)
-
I use this code (from the wordpress codex) for echo all images in a post as thumbnails.
When you click on the thumbnails, they opens up in a new window, however I want them just replaced to the full size image on their left side.(Please view my live example here)
<?php $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => 'any', 'post_parent' => $post->ID, 'exclude' => get_post_thumbnail_id(), ); $attachments = get_posts( $args ); if ( $attachments ) { foreach ( $attachments as $attachment ) { the_attachment_link( $attachment->ID, false ); } } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Thumbnail links to full size (remove attachment link)’ is closed to new replies.