Forums

[resolved] Problem with the loop (3 posts)

  1. ehab
    Member
    Posted 2 years ago #

    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

    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 />
  2. ehab
    Member
    Posted 2 years ago #

    Hey all - found the solution. It was missing a plugin. sorry for the trouble -)

  3. sunflyer
    Member
    Posted 1 year ago #

    where did you find the plugin ?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags