I used single.php
for this code:
<?php $categories = get_the_category($post->ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$args=array(
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'showposts'=>6, //Gösterilecek yazı adeti
'caller_get_posts'=>1
);
$benzer = new wp_query($args);
if( $benzer->have_posts() ) {
while ($benzer->have_posts()) {
$benzer->the_post();
?>
<div class="urundetaykutu">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</div>
<?php } } wp_reset_query(); }?>
This code working, but I want to use pagination in the loop.