Kodlarını bu şekil degiştirebilirsin. Yazı resminide Öne çıkarılmış görsel olarak belirle bölümünden ekleyeceksin.
<div class="habersirala">
<!-- Döngü başlıyor -->
<?php query_posts('showposts=5&orderby=date&cat=17'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="article">
<div class="article-header">
<!-- Yazı başlığı -->
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<!-- Yazı bilgileri -->
<ul>
<li>Tarih : <?php the_time('j F Y'); ?></li>
<li>Kategori : <?php the_category(', ') ?></li>
<li><?php comments_number('Yorum Yok', '1 Yorum ', '% Yorum' );?></li>
</ul>
<div class="clear"></div>
</div>
<div class="article-content">
<div class="articleyazi">
<!-- Yazının içeriği -->
<p><img alt="<?php the_title(); ?>" src="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 201,181 ), false, '' ); echo $src[0]; ?>" width="201" height="181" style="float: left" class="blogresim"></p><?php echo kisalt($post->post_content, 57); ?>..
<div class="clear"></div>
</div>
</div>
</div>
<style type="text/css">.blogresim {border-style: solid;border-width: 2px;margin-top: 1px;margin-bottom: 1px;margin-right:10px;}</style>
<!-- Döngü bitiyor -->
<?php endwhile; else: ?>
<?php endif; ?>
</div> </div>Function
function kisalt($excerpt, $substr=0) {
$string = strip_tags(str_replace('[...]', '...', $excerpt));
if ($substr>0) {
$string = mb_substr($string, 0, $substr,'UTF-8');
}
return $string;
}