Arkadaşlar merhaba php ile manuel yapılan slider kategorisini verdiğim (koda numarasını yazdığım) numaranın son eklenen yazılarını çekip gösteriyor.
Fakat nedendir bilmiyorum son eklenen yazı hep 2 tane geliyor. Yani 1. seçimde de 2. seçimde de aynı yazı geliyor. Hep bu şekilde olmuş 3'ten sonrası normal devam ediyor.
Sebebini anlamadım aşağıda resimlerini ve kodlarını paylaştım nerede hata yaptığım konusunda yarıdmcı olabilir misiniz?
<div id="banner">
<div id="anaslayt" class="col-xs-12 col-sm-12">
<?php query_posts('showposts=10&cat=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<a class="slidesjs-slide" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" /></a>
<?php } ?>
<div class="yaziarka">
<span class="yazi"><?php the_title(); ?></span>
</div>
<?php endwhile; ?>
</div>
<div id="sabitbanner" class="pull-right hidden-sm hidden-xs">
<div class="yatayhaber">
<?php query_posts('showposts=1&cat=1&posts_per_page=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" />
<?php } ?>
<span class="yazi pull-left col-md-12"><?php the_title(); ?></span>
</a>
<?php endwhile;?>
</div>
<?php query_posts('showposts=2&&cat=1&offset=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="dikeyhaber">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" />
<?php } ?>
<span class="yazi pull-left col-md-12"><?php the_title(); ?></span></a>
</div>
<?php endwhile;?>
</div>
</div> <div id="banner">
<div id="anaslayt" class="col-xs-12 col-sm-12">
<?php $cat = new WP_Query(array( 'cat' => '1', 'posts_per_page' => 10)); while($cat->have_posts()) : $cat->the_post();?>
<a class="slidesjs-slide" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" /></a>
<?php } ?>
<div class="yaziarka">
<span class="yazi"><?php the_title(); ?></span>
</div>
<?php endwhile; ?>
</div>
<div id="sabitbanner" class="pull-right hidden-sm hidden-xs">
<div class="yatayhaber">
<?php $cat = new WP_Query(array( 'cat' => '1', 'posts_per_page' => 1, 'offset' => 10)); while($cat->have_posts()) : $cat->the_post();?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" />
<?php } ?>
<span class="yazi pull-left col-md-12"><?php the_title(); ?></span>
</a>
<?php endwhile;?>
</div>
<?php $cat = new WP_Query(array( 'cat' => '1', 'posts_per_page' => 2, 'offset' => 11)); while($cat->have_posts()) : $cat->the_post();?>
<div class="dikeyhaber">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(has_post_thumbnail()) { the_post_thumbnail(); }
elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){ ?>
<img src ="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" title = "<?php the_title(); ?>" />
<?php } ?>
<span class="yazi pull-left col-md-12"><?php the_title(); ?></span></a>
</div>
<?php endwhile;?>
</div>
</div>