• Hello experts.

    Below is the code for my home.php page.

    I want to show the comments at the bottom of each post including the first post. So that visitors do not have to click on the “1 Comments” link to actually see the comment.

    Can someone please change the following code for me so to get this desired result?

    <?php get_header(); ?>
    
    <div id="content"><!-- begin content -->
    
    <h2 class="title">Latest Ramblings</h2>
    
    <div class="home"><!-- begin home -->
    
    		<?php query_posts('showposts=1'); // this shows the latest post you have written ?>
    		<?php while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<h3>by <?php the_author() ?> | <?php the_time('F jS, Y') ?> | Filed under: <?php the_category(', ') ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></h3>
    				<div class="entry">
    					<?php the_content('continue reading'); ?>
    				</div>
    			<?php if (function_exists('the_tags')) { the_tags('<p>Tags: ', ', ', '</p>'); } ?>
    			<?php edit_post_link('[edit]', '<p class="edit">', '</p>'); ?>
    		</div>
    			<?php endwhile; ?>
    			<?php wp_reset_query(); ?>
    </div><!-- end home -->
    
    <div class="spacer"></div> <!-- the hr below the first post -->
    
    <div class="recentposts"><!-- begin recent posts -->
    
    		<?php $args =array("post__not_in" =>get_option("sticky_posts"), 'offset'=>1); query_posts($args); // to not display the stick posts again in the normal sequence as they are already displayed up top ?>
    		<?php while (have_posts()) : the_post(); ?>
    		<div class="repost" id="post-<?php the_ID(); ?>">
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<p class="repostmetadata">by <?php the_author() ?> | <?php the_time('F jS, Y') ?> | Filed under: <?php the_category(', ') ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><br/>
        	<?php if(function_exists("the_tags")) the_tags('Tags: ', ', ', ''); ?></p>
    		<?php the_content('continue reading'); ?> <!-- Added to include the FULL post -->
    		<?php edit_post_link('[edit]', '<p class="edit">', '</p>'); ?>
    
    		</div>
    		<?php endwhile; ?>
    
    </div><!-- end recent posts-->
    
    </div> <!-- end begin content -->
    
    <?php include(TEMPLATEPATH."/left.php");?>
    <?php include(TEMPLATEPATH."/right.php");?>
    
    <?php get_footer(); ?>

    Thank you much.

    –wpf.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Showing comments on all posts by default’ is closed to new replies.