Return to Snippet

Revision: 22278
at January 7, 2010 12:14 by svenkaemper


Initial Code
<?php
//display all post titles, and if an excerpt exists, show it
$posts=get_posts('post_type=post&showposts=-1');
if ($posts) {
  foreach($posts as $post) {
    setup_postdata($post);
    ?>
    <p><?php the_time('m.d.y') ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
    <?php
    if ($post->post_excerpt) {
      echo 'excerpt is:' . $post->post_excerpt;
    }
  }
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Excerpts in WordPress

Initial Tags
wordpress

Initial Language
PHP