buddhaben adlı üyeden alıntı: mesajı görüntüle
Merhaba Arkadaşlar;
İnternette aramalarımda sürekli R10 yönlendirildim ama forumda çözümünü bulamadım.
Arayan arkadaşlara yardımcı olmak için paylaşmak istedim.
Kaynak

Bu kodu temanızın attachment.php dosyasında içerik kısmını üzerine ekliyoruz.

<div class="image-navigation">
    <?php $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
    foreach ( $attachments as $k => $attachment )
        if ( $attachment->ID == $post->ID )
            break;
    $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
       $next_url =  isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]->ID) : get_permalink($attachments[0]->ID);
       $previous_url =  isset($attachments[$k-1]) ? get_permalink($attachments[$k-1]->ID) : get_permalink($attachments[0]->ID);
    if ( wp_get_attachment_image( $post->ID+1 ) != null ) { ?>
        <p class="attachment" style="float: right">
            <a href="<?php echo $next_url; ?>">Sonraki Resim</a>
        </p>
    <?php }
 
    if ( wp_get_attachment_image( $post->ID-1 ) != null ) { ?>
        <p class="attachment" style="float: left">
                       <a href="<?php echo $previous_url; ?>">Önceki Resim</a>
        </p>
    <?php } ?>
</div>
Temanızda attachment.php yoksa böyle bir dosya oluşturuyoruz ve içine single.php dosyasının kodlarını kopyalıyoruz. Daha sonra bu yeni dosyamızda bulunan
<?php
							the_content();
							wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>' ) );							
							?>
Kodu yerine ( her temada aynı olmayabilir. the_content(); kodunu baz alıp bu kalıba benzer kalıbı bulabilirsiniz.) Aşağıdaki kodu ekliyoruz.
<?php if (wp_attachment_is_image($post->id)) {
                $att_image = wp_get_attachment_image_src( $post->id, "medium");
                ?>
                <p class="attachment">
                    <a href="<a href="<?php echo $next_url; ?>" title="<?php the_title(); ?>">
                    <img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>"  class="attachment-medium" alt="<?php the_title(); ?>" />
                    </a>
                </p>
 
                <?php } ?>
yeni dosyamıza ilk kodu eklemeyi unutmayın. Ben de çalıştı işinize yarar.

Not: Kaynakta galeride bulunan fotoğrafın üzerine tıklandığında bir sonraki fotoğrafa geçiş yapılmıyordu bunu ekledim.

Demo: http://www.colorfulland.net/circular...ircular-skirt/
Güncelleme: Galeride açılan resimlerin alt etiketini başlıktan çekecek şekilde düzenledim.