Title: Problem with the loop
Last modified: August 18, 2016

---

# Problem with the loop

 *  Resolved [ehab](https://wordpress.org/support/users/ehab/)
 * (@ehab)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/problem-with-the-loop/)
 * Hi all.
 * this is the code my theme uses for the loop in the home page. It displays one
   post from one catagory only.
 * by default, the catagory in the code is set to one. There is no posts in that.
   And the site appears correct. ( nothing appears where the posts is supposed to..)
 * But, when I put category as 3, where there is the post, the site gets broken –
   Just after the Permalink to the post appears.
 * Check it out please. [http://72.47.201.50](http://72.47.201.50)
 * Here is the LOOP CODE
 *     ```
       <h2>Bangladesh News</h2>
   
       			<?php $recent = new WP_Query("cat=3&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
       			<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
       			<?php the_content_limit(130, ""); ?>
   
       			<div class="hppostmeta">
       				<p><?php the_time('F j, Y'); ?> | <a href="<?php the_permalink() ?>" rel="bookmark">Read the story &raquo;</a></p>
       			</div>
   
       			<?php endwhile; ?><br />
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [ehab](https://wordpress.org/support/users/ehab/)
 * (@ehab)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/problem-with-the-loop/#post-641370)
 * Hey all – found the solution. It was missing a plugin. sorry for the trouble -)
 *  [sunflyer](https://wordpress.org/support/users/sunflyer/)
 * (@sunflyer)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/problem-with-the-loop/#post-641540)
 * where did you find the plugin ?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem with the loop’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [sunflyer](https://wordpress.org/support/users/sunflyer/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/problem-with-the-loop/#post-641540)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
