I did the following to display a single post in my home page:
home.php:
<?php
get_header();
query_posts('posts_per_page=1'); //returns only the front page
?>
<div id="content">
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part( 'loop', 'index' );
?>
</div>
<div id="sidebar">
<?php get_sidebar(); ?>
</div>
<div id="footer">
<?php get_footer(); ?>
But I still ahave to click Comments
in order to see the comments and the form to leave a comment. How can I automatically show immediately?
Load the comments template using
<?php comments_template(); ?>
– that’ll display all comments for the current post.