<?php require($_SERVER['DOCUMENT_ROOT'] . '/blog/wp-load.php'); query_posts('showposts=3'); if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('home-thumbnail'); ?>
</a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<h4><?php the_title(); ?></h4>
</a>
<p><span>Posted on <?php the_time('l jS F, Y') ?></span></p>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<p class="readmore">Read more...</p>
</a>
<?php endwhile; else: echo "no posts"; endif; ?>
<?php wp_reset_query(); ?>
Wordpress - Display latest post summary on a static page including the thumbnail / featured image.
1 Response
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.