acayip adlı üyeden alıntı: mesajı görüntüle
$sirano = 1;
bu kısmı:

$sirano = ($sayfa <= 1) ? 1 : (($sayfa-1)*20)+1;
yaparsan düzelir

HOCAM SÜPERSİN. Düzeldi ancak eksik kalan birşey var. Burada sıralamayı veritabanındaki post_author a göre yaptırmak gerekiyor. Bu şekilde veritabanındaki bütün postları çekiyor. Hangi yazarın sayfasına girilirse o yazarın postlarının sıralanması gerekiyor.

Aşağıdaki kod ile yazarın yazılarından yorum yapılanlar listeleniyor. Bu koda göre uyarlayabilir misiniz? Biraz zahmetli olacak ama yaparsanız çok sevinirim.

<h4>Popular Poems of <?php the_author(); ?></h4>
<ul>

<?php 
global $wp_query;
$curauth = $wp_query->get_queried_object();
$result = $wpdb->get_results("SELECT post_author,comment_count,ID,post_title FROM $wpdb->posts ORDER BY post_author = '" . $curauth->ID . "' and comment_count DESC LIMIT 0 , 10");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post->ID;
$title = $post->post_title;
$commentcount = $post->comment_count;
if ($commentcount != 0) { ?>
<li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>">
<?php echo $title ?></a> {<?php echo $commentcount ?> Comments} </li>

<?php } } } ?>
</ul>