• 09-12-2009, 10:18:17
    #1
    Son yazılan yorum en üstte görünüyor. Bunu default hale nasıl getirebilirim?

    yorum listeleme kodları bunlar

    <!-- You can start editing here. -->
    <?php if ($comments) : ?>
    	<?php $comments = array_reverse($comments) ?>
    	<h3 id="comments"><?php comments_number('Yorum Ekle', '1 adet yorum yazılmış.', '% adet yorum yazılmış.' );?></h3>
    	<ol class="commentlist">
    		<?php wp_list_comments('callback=custom_comment');?>
    	</ol>
    Birde fonksiyon.php'nin içinde de yorumlar için yazılmış ekstra kodlar mevcut.

    // Custom Comment
    function custom_comment($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment; ?>
       <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
         <div id="comment-<?php comment_ID(); ?>">
             <div class="comment-author vcard">
                    <?php echo get_avatar($comment,$size='28',$default='<path_to_url>' ); ?>
                    <div class="author_info">
    					<?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?> <?php edit_comment_link(__('(Düzenle)'),'  ','') ?><br />
                        <em><?php printf(__('%1$s at %2$s'), get_comment_date('Y/m/d '),  get_comment_time(' H:i:s')) ?></em>
                    </div>
                    <div class="reply">
    			   		<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
                  	</div>
              </div>
    		  <?php if ($comment->comment_approved == '0') : ?>
                 <em><?php _e('Yorumunuz incelendikten sonra yayınlanacaktır.') ?></em>
                 <br />
              <?php endif; ?>
    
          		<?php comment_text() ?>
         </div>
  • 09-12-2009, 14:44:03
    #2
    <?php $comments = array_reverse($comments) ?>
    kısmını kaldırmalısın
  • 09-12-2009, 16:06:10
    #3
    gdi
    Üyeliği durduruldu
    veya admin kontrol panelinden yorum kisminda eskileri sonra secenegi secebilirsin
  • 09-12-2009, 16:59:50
    #4
    dmRy adlı üyeden alıntı: mesajı görüntüle
    <?php $comments = array_reverse($comments) ?>
    kısmını kaldırmalısın
    Çok teşekkürler hakan.
  • 09-12-2009, 17:55:15
    #5
    Önemli değil