
Wordpress excerpt code
By: a guest on
Sep 23rd, 2012 | syntax:
PHP | size: 1.42 KB | hits: 18 | expires: Never
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<ul class="recent-posts innlegg"><li class="post-77 post type-post status-publish format-standard hentry cat-7-id cat-31-id cat-8-id">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<span class="meta"><span class="fleft">Av <?php the_author(); on ?></span>
<span class="post-date"><?php the_time('d') ?><br><?php the_time('M') ?>
</span></span>
<figure class="featured-thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
<?php if (function_exists('the_post_thumbnail') AND !function_exists('tfe_get_image')) the_post_thumbnail(); ?></a>
</figure><div class="excerpt"><?php the_excerpt(); ?><a href="<?php the_permalink(); ?>" class="button" title="<?php the_title(); ?>">Read more..</a></div><div class="clear"></div></li>
<!-- .entry (end) --> </ul></div>
<?php endwhile; ?>
<div class="navigation">
<div class="next-posts" align="center"><strong><?php next_posts_link('Next page >>'); ?></strong></div>
<div class="prev-posts" align="center"><strong><?php previous_posts_link('<< Previous page'); ?></strong></div>
</div>
<?php else : ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h1>Not Found</h1>
</div>
<?php endif; ?>