Adding latest blog posts to homepage
-
I am trying to add my latest blog posts to my homepage. I am placing the following code on my homepage:
<?php
require(‘/myblog/wp-blog-header.php’);
?><?php
$posts = get_posts(‘numberposts=5&order=ASC&orderby=post_title’);
foreach ($posts as $post) : start_wp(); ?>
” rel=”bookmark” title=”Permanent Link to<?php the_title(); ?>”><?php the_title(); ?>
<?php the_excerpt(); ?>
<?php
endforeach;
?>This does not seem to be working as all that is appearing on my homepage where the posts should be is ” rel=”bookmark” title=”Permanent Link to”>
Can anyone see what I maybe doing wrong or the reason for this.
Thanks in advance
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Adding latest blog posts to homepage’ is closed to new replies.