Forum Moderators: rogerd & travelin cat
"it just makes it a bit harder to create an integrated navigation and so forth"
-ergo
<?php
// ===========
// wp-latest.php
// ===========
// Last Updated: 2010-06-15
// By: Randy Harris (office@lexipixel.com)
//
// This stub file is designed to be included into a static HTML
// file, and will cause the latest post excerpts from a WordPress
// blog to be inserted into the HTML page.
//
// *NOTE: your web server must be configured for SSI or the calling page needs to be PHP and use the include() statement.
//
// The file is included using the HTML Server Side Include (SSI) tag*:
//
// <!--#include virtual="/dir/subdir/wp-latest.php" -->
//
// at the point in your HTML page where you want the posts to display.
//
//
// *NOTE 2: if you have thumbnails and want them to display, you must add:
//
// add_theme_support( 'post-thumbnails' );
// set_post_thumbnail_size( 175, 105, true ); // Normal post thumbnails
// add_image_size( 'single-post-thumbnail', 300, 9999 ); // Permalink thumbnail size
//
// to your THEME functions.php file, otherwise, remove the entire line (below)
// that starts with <?php if ( has_post_thumbnail().......
//
// You can adjust the thumbnail sizes in the set_post_thumbnail_size() function.
//
?>
<!-- set path to your wp-blog-header.php file -->
<?php require('/actual/path/to/wordpress/wp-blog-header.php'); ?>
<!-- set number of posts to display -->
<?php query_posts('showposts=8'); ?>
<!-- start the loop -->
<?php while (have_posts()) : the_post(); ?>
<div style="margin: 4px 0px; border-style: dotted; border-color: #dddddd; border-width: 0px 0px 1px 0px;">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a><br>
<?php if ( has_post_thumbnail() ) { ?><div style="margin: 0px 0px 0px 6px; float:right;"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail() ?></a></div><?php } ?>
<?php $excerpt = strip_tags(get_the_excerpt()); echo $excerpt; ?><br>
<br>
</div>
<?php endwhile;?>
<!-- end the loop -->
<!-- EOF: wp-latest.php -->