Using version 2.8.5
I am trying to display my recent blog posts on a non-Wordpress page.
I tried using:
<?php
require(‘./wp-blog-header.php’); // alter to path to wp-blog-header.php script on your site
?>
<!– if you want to have a title graphic it goes here –>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
# <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a> <small> in <?php the_category(’, ‘) ?> </small><small><?php the_time(’m-d-Y’); ?> <?php the_time(’g:i a’); ?></small><br />
<?php endforeach; else: ?>
<!– put what you want here when there are no posts –>
<?php endif; ?>
but it doesn't display anything.
Is there something else that will work?
Thanks.