wordpress blogumda ekli olan resime tıklayınca sonraki resimin açılmasını istiyorum.
yani attachment sayfasında image.php'de galeri gibi düşünün birden çok resim var. a1 resmini görüntülerken a1'in üstüne tıklayınca a2 açılsın istiyorum. aşağıdaki şekilde bir kod var elimde nasıl ilerletebilirim.
<a href="<?php echo wp_get_attachment_url($post->ID); ?>">
kısmını sonraki resim linkiyle değiştirmem gerekiyor. wordpress aşağıdaki kodu veriyor ama o kodu ekleyince sonraki resmin thumb halini ve linkini veriyor. benim istediğim sayfada sadece görüntülenen resim olsun ve o resime tıklayınca sonraki resim açılsın.
<?php next_image_link(); ?>
elimdeki kod ise şöyle.
<div align="center"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></div>
wordpress'te sonraki resim kodu?
5
●1.268
- 14-10-2012, 04:21:40http://wpthemetutorial.com/2011/12/0...ts-navigation/
şunu bir inceleyin hocam işinize yarayabilir.
<?php
$nextPost = get_next_post();
$nextThumb = get_the_post_thumbnail($nextPost->ID, 'medium');
$nextTitle = $nextPost->post_title;
?>
<p class="next-link"><?php next_post_link('%link','<span><</span> '.$nextTitle); ?>