&cat=1 silmen yeterlidir.
O şekilde de olmadı.
Sayfa:
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
get_header();
?>
<div id="sol">
<div class="solbaslikana"><div style="float: left;margin-top: 6px;">Haberler</div> <div style="float: left;margin-left: 330px; margin-top: 8px;"><a class="solbaslinkana">
</a></div></div>
<div class="solbaslikortaana">
<?php $recent = new WP_Query("showposts=20&cat=1"); while($recent->have_posts()) :
$recent->the_post();?>
<div class="haber"> <?php if( get_post_meta($post->ID, "Thumbnail", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img src="<?php bloginfo('template_url'); ?>/images/kirita.png" alt="<?php the_title(); ?>" /></a>
<?php endif; ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark"> <?php if (strlen($post->post_title) > 50) {
echo mb_substr(the_title($before = '', $after = '', FALSE), 0, 50) . '...'; } else {
the_title();
} ?> </a></h2>
<div class="haberkonu"><a href="<?php the_permalink() ?>"><?php the_content_limit(70, ""); ?></a> </div> </div> <?php endwhile; ?>
</div> <div class="solbaslikaltana"></div>
<div class="solbaslikalt"></div>
<?php wp_pagenavi(); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>Aynı zamanda bu sayfada tek kategori olduğu için Haberler başlığı da var, onun yerine de her kategorinin kendi ismini getirtmeyi sağlamalıyız.