• 30-09-2018, 17:43:02
    #1
    Merhaba, aşağıda ki resimde bulunan özel alan içerisinde ki galeri resimlerinin hepsini yazı içerisinde gösteremiyorum kullandığım kod ile resimlerin sadece 1 tanesini gösterebiliyorum sanırım kod eksik veya hatalı yardımcı olabilecek var mı?

    Özel Alan:
    https://prnt.sc/l0h1ml

    Kullandığım Kod:
    <?php $resimler = get_post_meta(get_the_ID(), 'resimler', true); ?>
    <?php if ( $resimler && is_single() ): ?>
    <?php
    $resimler = get_post_meta( $post->ID, 'resimler' );								
    if ( $resimler ) {
    foreach ( $resimler as $attachment_id ) {
    $thumb = wp_get_attachment_image( $attachment_id, 'full' );
    $full_size = wp_get_attachment_url($attachment_id);
    printf( '<a href="%s">%s</a>', $full_size, $thumb );
    }
    }
    ?></br>
    <?php endif; ?>
  • 30-09-2018, 17:49:02
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    hocam get post metaya true eklenince unique oluyo true ifadesini kaldırıp print_r yapıp çıktıyı verirmisin
  • 30-09-2018, 17:51:45
    #3
    <?php $resimler = get_post_meta(get_the_ID(), 'resimler', true); ?>
    <?php if ( $resimler && is_single() ): ?>
    <?php
    $resimler = explode(",",get_post_meta( $post->ID, 'resimler' ));                        
    if ( $resimler ) {
    foreach ( $resimler as $attachment_id ) {
    $thumb = wp_get_attachment_image( $attachment_id, 'full' );
    $full_size = wp_get_attachment_url($attachment_id);
    printf( '<a href="%s">%s</a>', $full_size, $thumb );
    }
    }
    ?></br>
    <?php endif; ?>
    Dener misiniz?
  • 30-09-2018, 18:24:04
    #4
    Onur89TR adlı üyeden alıntı: mesajı görüntüle
    <?php $resimler = get_post_meta(get_the_ID(), 'resimler', true); ?>
    <?php if ( $resimler && is_single() ): ?>
    <?php
    $resimler = explode(",",get_post_meta( $post->ID, 'resimler' ));                        
    if ( $resimler ) {
    foreach ( $resimler as $attachment_id ) {
    $thumb = wp_get_attachment_image( $attachment_id, 'full' );
    $full_size = wp_get_attachment_url($attachment_id);
    printf( '<a href="%s">%s</a>', $full_size, $thumb );
    }
    }
    ?></br>
    <?php endif; ?>
    Dener misiniz?
    Yine aynı hocam olmadı malesef.



    codeHIGH adlı üyeden alıntı: mesajı görüntüle
    hocam get post metaya true eklenince unique oluyo true ifadesini kaldırıp print_r yapıp çıktıyı verirmisin
    Hocam bu şekilde resimler hiç görüntülenemiyor olmadı.