I've got a blog and a website; the two are separate things all together. For example, I have www.domainname.com as the main site, and the blog would be at www.domainname.com/blog/
It's a WordPress blog, however I don't want people looking at the WordPress front-end, so I would like to write a php function that would pull the posts from WordPress to a separate page on the main site.
The function I've got so far is as follows:
<div id="blogPosts">
<?php
require('../path1/path2/wp-blog-header.php');
?>
<?php
$posts = get_posts('numberposts=10&order=DESC&orderby=post_title');
foreach ($posts as $post) : start_wp();
?>
<h4 class="blogDate"> <? the_date(); ?> </h4>
<hr />
<h5 class="blogTitle"> <? the_title(); ?> </h5>
<p class="blogText"> <? the_excerpt() ?> </p>
<br />
<?php
endforeach;
?>
</div>
It will display the page fine, but it's not posting the posts to the page at all. Any ideas why it won't work?
the_excerpt();- Milo LaMar