Can image.php shows only attachment form [gallery]
-
Hi,
I use native gallery function and a modified version of image.php to enlarge the gallery items. (using image.php instead of fancy or similar grow up my page-views…)But the problem is that when I use
next_image_link()
andprevious_image_link
, image.php load an attachment image on the whole post, not just the [gallery] ids.this is the code:
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); if ($image) : ?> <img src="<?php echo $image[0]; ?>" alt="" /> <br> <br> <?=$att_title = apply_filters( 'the_title' , $attachment->post_excerpt); echo '<p style="margin-top:20px;">' . the_excerpt() . '</p>' ; ?> <?php endif; ?> <!-- </a> --> <ul id="gallery-nav" class="clearfix"> <li class="next pull-left"><?php next_image_link() ?></li> <li class="previous pull-right"><?php previous_image_link() ?></li> </ul>
Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can image.php shows only attachment form [gallery]’ is closed to new replies.