Don't like ads? PRO users don't see any ads ;-)
Guest

Wordpress excerpt code

By: a guest on Sep 23rd, 2012  |  syntax: PHP  |  size: 1.42 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  2.  
  3.         <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  4.  
  5. <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">
  6.  
  7.                 <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  8.                 <span class="meta"><span class="fleft">Av <?php the_author(); on ?></span>
  9.                 <span class="post-date"><?php the_time('d') ?><br><?php the_time('M') ?>
  10.                 </span></span>
  11.                 <figure class="featured-thumbnail">
  12.                 <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  13.                <?php if (function_exists('the_post_thumbnail') AND !function_exists('tfe_get_image')) the_post_thumbnail(); ?></a>
  14. </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>
  15.  
  16.         <!-- .entry (end) --> </ul></div>
  17.  
  18. <?php endwhile; ?>
  19.  
  20.         <div class="navigation">
  21.                 <div class="next-posts" align="center"><strong><?php next_posts_link('Next page >>'); ?></strong></div>
  22.                 <div class="prev-posts" align="center"><strong><?php previous_posts_link('<< Previous page'); ?></strong></div>
  23.         </div>
  24.  
  25. <?php else : ?>
  26.  
  27.         <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  28.                 <h1>Not Found</h1>
  29.         </div>
  30.  
  31. <?php endif; ?>