• 25-06-2013, 01:53:08
    #1
    Arkadaşlar benim wordpress resim galerim var. Resim galerimde "ana konuya giriş" linki orjinal konuya dönüyor ama bunu text olarak "ana konuya giriş" değilde konu ismi yapabilirmiyim? Yani orj. konu adı "elbise modelleri" ise anchor text 'de bu şekilde olacak.

    Kod bu arkadaşlar.

    Alıntı
    printf( __( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr> <span class="meta-prep meta-prep-entry-date">tarihinde yayınlanan Ana Konu: <a href="%6$s" title="Geri Dön: %7$s" rel="gallery">Ana Konuya Giriş</a><br></span></span> Resimi Tam Boyut Görmek İçin: <a href="%3$s" title="Tam boyutlu resim">%4$s &times; %5$s</a>' ),
  • 25-06-2013, 01:57:40
    #2
    temanızda bir title değeri olması lazım. bu fonksiyon dosyasında yada işlem yaptığınız dosyada bir değişken olarak bulunuyordur yoksada wp_query ile çekmeniz gerekiyor
  • 25-06-2013, 06:15:34
    #3
    Big_Turk adlı üyeden alıntı: mesajı görüntüle
    temanızda bir title değeri olması lazım. bu fonksiyon dosyasında yada işlem yaptığınız dosyada bir değişken olarak bulunuyordur yoksada wp_query ile çekmeniz gerekiyor
    Hocam isterseniz tema içerisinde yer alan image.php dosyasını göndereyim size bakın?
  • 25-06-2013, 11:11:48
    #4
    Bana göndermek yerine kodları burda paylaşırsanız daha hızlı cevap alabilirsiniz.
  • 25-06-2013, 19:05:06
    #5
    Big_Turk adlı üyeden alıntı: mesajı görüntüle
    Bana göndermek yerine kodları burda paylaşırsanız daha hızlı cevap alabilirsiniz.
    image.php içindeki kodlar

    Alıntı
    <?php
    /**
    * Yazıya eklenmiş resimleri göstermek içindir. Arthemia
    *
    * @package WordPress
    */

    get_header(); ?>

    <div id="content">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <span class="breadcrumbs"><a href="<?php echo get_option('home'); ?>/">Anasayfa</a> &raquo; <?php the_category(', ') ?></span>

    <h2 class="title"><?php the_title(); ?></h2>

    <div id="stats">
    <span><?php the_time('j F Y') ?></span>
    <span>Bu Haber <?php if(function_exists('the_views')) { the_views(); } ?> kez okundu</span>
    <span><?php comments_number('Yorum Yok', '1 Yorum', '% Yorum' );?></span>
    <span><?php edit_post_link('Düzenle'); ?></span></div>




    <div class="entry clearfloat"><center>336280</center><br><br>



    <!-- Resim Adresi Başı -->
    <?php
    /**
    * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
    * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
    */
    $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;
    }
    $k++;
    // If there is more than 1 attachment in a gallery
    if ( count( $attachments ) > 1 ) {
    if ( isset( $attachments[ $k ] ) )
    // get the URL of the next image attachment
    $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
    else
    // or get the URL of the first image attachment
    $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
    } else {
    // or, if there's only 1 image, get the URL of the image
    $next_attachment_url = wp_get_attachment_url();
    }
    ?>

    <table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F5FAF8">
    <tr>
    <td width="100%"><p align="center"><img src="http://www.bayanelbisemodelleri.org/images/resimgalerisi.png" alt="Resim Galerisi"></td>
    </tr>
    </table>

    <center><a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    $attachment_size = apply_filters( 'tikirti_attachment_size', 590 );
    echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
    ?></a>

    <?php if ( ! empty( $post->post_excerpt ) ) : ?>
    <div class="entry-caption">



    <?php the_title();?>


    <!-- Resim Adresi Sonu -->
    <br><br>46815<br><br>

    <!-- önceki sonraki resim başı -->
    <div style="590px; padding:10px; border: 1px solid #000; height:150px; margin-top:15px;">
    <center><p>Resimlerin bulunduğu ana konuda resim açıklamaları mevcuttur.</p></center>
    <center><p><?php
    $metadata = wp_get_attachment_metadata();
    printf( __( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr> <span class="meta-prep meta-prep-entry-date">tarihinde yayınlanan Ana Konu: <a href="%6$s" title="Geri Dön: %7$s" rel="gallery">Ana Konuya Giriş</a><br></span></span> Resimi Tam Boyut Görmek İçin: <a href="%3$s" title="Tam boyutlu resim">%4$s &times; %5$s</a>' ),
    esc_attr( get_the_time() ),
    get_the_date(),
    esc_url( wp_get_attachment_url() ),
    $metadata['width'],
    $metadata['height'],
    esc_url( get_permalink( $post->post_parent ) ),
    esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),

    esc_attr( strip_tags( get_the_content( $post->post_parent ) ) ),
    get_the_title( $post->post_parent )
    );
    ?></p></center>
    <span style="margin-left:200px; font-size:15px; float:left; padding-left:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/geri.gif) no-repeat left;"><?php previous_image_link( false,'Geri'); ?></span>
    <span style="margin-right:200px; font-size:15px; float:right; padding-right:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/ileri.gif) no-repeat right;"><?php next_image_link( false,'İleri' ); ?></span>
    </div>
    <!-- önceki sonraki resim sonu --><br>
    <?php the_content(); ?>


    </div>
    <?php endif; ?></center>



    <div class="fixed"></div>

    <?php the_tags( '<p>Etiketler: ', ', ', '</p>'); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>


    </div>


    </div>

    <div id="comments">
    <?php comments_template(); ?>
    </div>

    <?php endwhile; else: ?>

    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • 25-06-2013, 19:10:25
    #6
    dll adlı üyeden alıntı: mesajı görüntüle
    image.php içindeki kodlar
    <?php
    /**
    * Yazıya eklenmiş resimleri göstermek içindir. Arthemia
    *
    * @package WordPress
    */
    
    get_header(); ?>
    
    <div id="content">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    <span class="breadcrumbs"><a href="<?php echo get_option('home'); ?>/">Anasayfa</a> &raquo; <?php the_category(', ') ?></span>
    
    <h2 class="title"><?php the_title(); ?></h2>
    
    <div id="stats">
    <span><?php the_time('j F Y') ?></span>
    <span>Bu Haber <?php if(function_exists('the_views')) { the_views(); } ?> kez okundu</span>
    <span><?php comments_number('Yorum Yok', '1 Yorum', '% Yorum' );?></span>
    <span><?php edit_post_link('Düzenle'); ?></span></div>
    
    
    
    
    <div class="entry clearfloat"><center>336280</center><br><br>
    
    
    
    <!-- Resim Adresi Başı -->
    <?php
    /**
    * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
    * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
    */
    $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;
    }
    $k++;
    // If there is more than 1 attachment in a gallery
    if ( count( $attachments ) > 1 ) {
    if ( isset( $attachments[ $k ] ) )
    // get the URL of the next image attachment
    $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
    else
    // or get the URL of the first image attachment
    $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
    } else {
    // or, if there's only 1 image, get the URL of the image
    $next_attachment_url = wp_get_attachment_url();
    }
    ?>	
    
    <table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F5FAF8">
    <tr>
    <td width="100%"><p align="center"><img src="http://www.bayanelbisemodelleri.org/images/resimgalerisi.png" alt="Resim Galerisi"></td>
    </tr>
    </table>
    
    <center><a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    $attachment_size = apply_filters( 'tikirti_attachment_size', 590 );
    echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
    ?></a>
    
    <?php if ( ! empty( $post->post_excerpt ) ) : ?>
    <div class="entry-caption">
    
    
    
    <?php the_title();?>
    
    
    <!-- Resim Adresi Sonu -->
    <br><br>46815<br><br>
    
    <!-- önceki sonraki resim başı -->
    <div style="590px; padding:10px; border: 1px solid #000; height:150px; margin-top:15px;">
    <center><p>Resimlerin bulunduğu ana konuda resim açıklamaları mevcuttur.</p></center>
    <center><p><?php
    $baslik = get_the_title();
    $metadata = wp_get_attachment_metadata();
    printf( __( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr> <span class="meta-prep meta-prep-entry-date">tarihinde yayınlanan Ana Konu: <a href="%6$s" title="Geri Dön: %7$s" rel="gallery">'.$baslik.'</a><br></span></span> Resimi Tam Boyut Görmek İçin: <a href="%3$s" title="Tam boyutlu resim">%4$s &times; %5$s</a>' ),
    esc_attr( get_the_time() ),
    get_the_date(),
    esc_url( wp_get_attachment_url() ),
    $metadata['width'],
    $metadata['height'],
    esc_url( get_permalink( $post->post_parent ) ),
    esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
    
    esc_attr( strip_tags( get_the_content( $post->post_parent ) ) ),
    get_the_title( $post->post_parent )
    );
    ?></p></center>
    <span style="margin-left:200px; font-size:15px; float:left; padding-left:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/geri.gif) no-repeat left;"><?php previous_image_link( false,'Geri'); ?></span>
    <span style="margin-right:200px; font-size:15px; float:right; padding-right:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/ileri.gif) no-repeat right;"><?php next_image_link( false,'İleri' ); ?></span>	
    </div>
    <!-- önceki sonraki resim sonu --><br>
    <?php the_content(); ?>
    
    
    </div>
    <?php endif; ?></center>
    
    
    
    <div class="fixed"></div>
    
    <?php the_tags( '<p>Etiketler: ', ', ', '</p>'); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    
    </div>
    
    
    </div>
    
    <div id="comments">
    <?php comments_template(); ?>
    </div>
    
    <?php endwhile; else: ?>
    
    <p>Sorry, no posts matched your criteria.</p>
    
    <?php endif; ?>
    
    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Şu şekilde denermisiniz çalışması lazım..
  • 26-06-2013, 01:30:20
    #7
    Big_Turk adlı üyeden alıntı: mesajı görüntüle
    <?php
    /**
    * Yazıya eklenmiş resimleri göstermek içindir. Arthemia
    *
    * @package WordPress
    */
    
    get_header(); ?>
    
    <div id="content">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    <span class="breadcrumbs"><a href="<?php echo get_option('home'); ?>/">Anasayfa</a> &raquo; <?php the_category(', ') ?></span>
    
    <h2 class="title"><?php the_title(); ?></h2>
    
    <div id="stats">
    <span><?php the_time('j F Y') ?></span>
    <span>Bu Haber <?php if(function_exists('the_views')) { the_views(); } ?> kez okundu</span>
    <span><?php comments_number('Yorum Yok', '1 Yorum', '% Yorum' );?></span>
    <span><?php edit_post_link('Düzenle'); ?></span></div>
    
    
    
    
    <div class="entry clearfloat"><center>336280</center><br><br>
    
    
    
    <!-- Resim Adresi Başı -->
    <?php
    /**
    * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
    * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
    */
    $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;
    }
    $k++;
    // If there is more than 1 attachment in a gallery
    if ( count( $attachments ) > 1 ) {
    if ( isset( $attachments[ $k ] ) )
    // get the URL of the next image attachment
    $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
    else
    // or get the URL of the first image attachment
    $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
    } else {
    // or, if there's only 1 image, get the URL of the image
    $next_attachment_url = wp_get_attachment_url();
    }
    ?>	
    
    <table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F5FAF8">
    <tr>
    <td width="100%"><p align="center"><img src="http://www.bayanelbisemodelleri.org/images/resimgalerisi.png" alt="Resim Galerisi"></td>
    </tr>
    </table>
    
    <center><a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    $attachment_size = apply_filters( 'tikirti_attachment_size', 590 );
    echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
    ?></a>
    
    <?php if ( ! empty( $post->post_excerpt ) ) : ?>
    <div class="entry-caption">
    
    
    
    <?php the_title();?>
    
    
    <!-- Resim Adresi Sonu -->
    <br><br>46815<br><br>
    
    <!-- önceki sonraki resim başı -->
    <div style="590px; padding:10px; border: 1px solid #000; height:150px; margin-top:15px;">
    <center><p>Resimlerin bulunduğu ana konuda resim açıklamaları mevcuttur.</p></center>
    <center><p><?php
    $baslik = get_the_title();
    $metadata = wp_get_attachment_metadata();
    printf( __( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr> <span class="meta-prep meta-prep-entry-date">tarihinde yayınlanan Ana Konu: <a href="%6$s" title="Geri Dön: %7$s" rel="gallery">'.$baslik.'</a><br></span></span> Resimi Tam Boyut Görmek İçin: <a href="%3$s" title="Tam boyutlu resim">%4$s &times; %5$s</a>' ),
    esc_attr( get_the_time() ),
    get_the_date(),
    esc_url( wp_get_attachment_url() ),
    $metadata['width'],
    $metadata['height'],
    esc_url( get_permalink( $post->post_parent ) ),
    esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
    
    esc_attr( strip_tags( get_the_content( $post->post_parent ) ) ),
    get_the_title( $post->post_parent )
    );
    ?></p></center>
    <span style="margin-left:200px; font-size:15px; float:left; padding-left:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/geri.gif) no-repeat left;"><?php previous_image_link( false,'Geri'); ?></span>
    <span style="margin-right:200px; font-size:15px; float:right; padding-right:47px; line-height:45px; background: url(http://www.bayanelbisemodelleri.org/ileri.gif) no-repeat right;"><?php next_image_link( false,'İleri' ); ?></span>	
    </div>
    <!-- önceki sonraki resim sonu --><br>
    <?php the_content(); ?>
    
    
    </div>
    <?php endif; ?></center>
    
    
    
    <div class="fixed"></div>
    
    <?php the_tags( '<p>Etiketler: ', ', ', '</p>'); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    
    </div>
    
    
    </div>
    
    <div id="comments">
    <?php comments_template(); ?>
    </div>
    
    <?php endwhile; else: ?>
    
    <p>Sorry, no posts matched your criteria.</p>
    
    <?php endif; ?>
    
    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Şu şekilde denermisiniz çalışması lazım..
    Elinize sağlık üstadım oldu. Tşk ettim.