cgspnb 0 Report post Posted February 19, 2011 Greetings I need to display excerpts of the last 5 blog posts on a feature home page. I created a new page template based on the Feature page standard template. It is identical to the original except it includes a new template based on template_posts that includes a new file called posts_home.php based on the original posts.php http://michaelsantos.net/test/ However it is saying that there is nothing there. There are lots of posts however.The same code has no problems displaying the posts correctly at http://michaelsantos.net/test/?page_id=4389 I have tried using the default posts.php file but I am getting the same results on the home page. Is there some other function related to the home page that is nullifying <?php if (!is_404() && have_posts()) : while (have_posts()) : the_post(); ?> Any assistance is appreciated! Share this post Link to post Share on other sites
kastelic 6 Report post Posted February 20, 2011 This is pretty advanced stuff so I've marked it for the developers. Share this post Link to post Share on other sites
Andrew 207 Report post Posted February 20, 2011 You can only use the `have_posts()` stuff on the posts page; WordPress controls when and where it can be used. In this case, you should use `get_posts` or a Query and loop through the responses with a `foreach` Share this post Link to post Share on other sites