Şu anda ben Wordpress (kod çalışıyor) için kenar çubuğu kod parçası olarak aşağıdaki kodu kullanıyorum:
<ul class="linklist">
<?php $recentPosts = new WP_Query();
$recentPosts->query('showposts=12');
while ($recentPosts->have_posts()) : $recentPosts->the_post();
?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to <?php the_title();
?>">
<?php the_title();
?></a> </li>
<?php endwhile;?> </ul>
It shows the last 12 posts. But what I'm looking for is the following; first check what category the current post (the post that is showing based on the permalink) belongs to, and then only list the latest posts that belong to that same category. What should be edited? Thanks!