/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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; } } } ?>