Title: aldob1's Replies | WordPress.org

---

# aldob1

  [  ](https://wordpress.org/support/users/aldob1/)

 *   [Profile](https://wordpress.org/support/users/aldob1/)
 *   [Topics Started](https://wordpress.org/support/users/aldob1/topics/)
 *   [Replies Created](https://wordpress.org/support/users/aldob1/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/aldob1/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/aldob1/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/aldob1/engagements/)
 *   [Favorites](https://wordpress.org/support/users/aldob1/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Show Background Between Posts](https://wordpress.org/support/topic/show-background-between-posts/)
 *  Thread Starter [aldob1](https://wordpress.org/support/users/aldob1/)
 * (@aldob1)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/show-background-between-posts/#post-1367544)
 * Here is the code that I’m using. I’ve added the style. Can you inset the code
   because I can’t get it to work as desired. Maybe I’m doing something wrong.
 *     ```
       <?php get_header(); ?>
   
           <div id="content">
   
       		<?php if (have_posts()) : ?>
   
       		<?php while (have_posts()) : the_post(); ?>
   
       				<div class="title">
       					<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
       					<span><?php the_time('F j, Y') ?></span>
       				</div>
   
       				<!-- entry start -->
       				<div class="entry">
                       	<?php the_content(''); ?>
                       	<!-- recent comment of each post -->
   
       						<div class="recent-comment">
       						 <?php
       							$comment_array = array_reverse(get_approved_comments($wp_query->post->ID));
       							$count = 1;
       						 ?>
   
       						<?php if ($comment_array) {  ?>
       							<span class="comment"> <?php comments_number('No comment','1 comment','% comments'); ?></span> - Latest by:
       							<ul class="commentlist">
       								<?php foreach($comment_array as $comment){ ?>
       									<?php if ($count++ <= 2) { ?>
       										<li><?php comment_author_link(); ?> <br /> <?php comment_excerpt(); ?> </li>
       									<?php } ?>
       								<?php } ?>
       							</ul>
       						<?php } else { ?> <!-- if there was no comment in that post,yet -->
       								<span class="comment">No comment so far</span>
       						<?php } ?>
       						</div>
   
       					<!-- end recent comment-->
       				</div>
                       <!-- entry end -->
   
                       <p class="postmetadata center">
       					<?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> |<!-- <?php edit_post_link('Edit', '', ' | '); ?> -->
       					<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
       				</p>
   
       			<?php endwhile; ?>
   
       				<div class="navigation">
                           <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
                           <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
       				</div>                
   
       		<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<p class="center">Sorry, but you are looking for something that isn't here.</p>
       		<?php get_search_form(); ?>
   
       	<?php endif; ?>		
   
       	</div>
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)