index.php
<?php get_header(); ?>
<!-- BEGIN content -->
<div id="content">
<?php
$tmp_query = $wp_query;
query_posts('cat=' . get_cat_ID(dp_settings('featured')));
if (have_posts()) :
$first = true;
while (have_posts()) : the_post();
ob_start();
?>
<li<?php if ($first) echo ' class="first"'; ?>><a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'full', 'alt="' . $post->post_title . '"'); ?></a></li>
<?php
$photos .= ob_get_clean();
ob_start();
?>
<li<?php if ($first) echo ' class="first"'; ?>>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p><?php echo dp_clean($post->post_content, 300); ?></p>
<a href="<?php the_permalink(); ?>" class="readmore">Tamamını Oku</a>
</li>
<?php
$text .= ob_get_clean();
$first = false;
endwhile;
endif;
?>
<!-- begin featured -->
<div class="featured">
<div class="thumb"><div class="b">
<ul class="photo">
<?php echo $photos; ?>
</ul>
<ul class="text">
<?php echo $text; ?>
</ul>
</div></div>
</div>
<!-- end featured -->
<?php
$wp_query = $tmp_query;
if (have_posts()) :
while (have_posts()) : the_post();
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$arc_day = get_the_time('d');
?>
<!-- begin post -->
<div class="post">
<div class="title">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p class="details">Yazar: <?php the_author_posts_link(); ?> Tarih: <a href="<?php echo get_day_link("$arc_year", "$arc_month", "$arc_day"); ?>"><?php the_time('M jS, Y') ?></a>
</p>
<p class="comments"><?php comments_popup_link('Yorum Yok', '1 Yorum', '% Yorum'); ?></p>
</div>
<div class="l">
<a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a>
</div>
<div class="r">
<p><?php echo dp_clean($post->post_content, 300); ?></p>
<p><a class="devam" href="<?php the_permalink(); ?>">Devamı</a></p>
</div>
<div class="meta">
<div class="tags">
Etiketler: <?php the_tags(''); ?>
</div>
<div class="undercat">
Kategori: <?php the_category(', ') ?>
</div>
</div>
</div>
<!-- end post -->
<?php endwhile; else : ?>
<div class="notfound">
<h2>Bulunamadı</h2>
<p>Üzgünüm.Aradığınız sayfa bulunamadı.</p>
</div>
<?php endif; ?>
<!-- begin post navigation -->
<div class="postnav">
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>
</div>
<!-- end post navigation -->
<div class="break"></div>
</div>
<!-- END content -->
<?php get_sidebar();
get_footer(); ?>