• This worked before but now it doesn’t! Can someone tell me what I am doing wrong?

    <?php query_posts('category_name=Featured&showposts=1');// WP_Query("showposts=1");
              while (have_posts()) : the_post();
               $do_not_duplicate = $post->ID;?>
    
        <!--
    		<?php trackback_rdf(); ?>
    		-->
        	<div class="post" id="post-<?php the_ID(); ?>">
          		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
          		<div class="postcontent">
    	  			<p><?php the_excerpt(); ?>  </p>
          		</div>
    		</div>
     	<?php endwhile; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am not 100% sure but maybe I’ve read somewhere the “category_name” is not reliable or not working properly. Try the ID instead of the name.

    Thread Starter otherjohn

    (@otherjohn)

    What gets me is if I just do query_posts(‘showposts=1’);
    it still doesnt work. It shows all post?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I can’t get index.php to only show 1 post! WP 2.1’ is closed to new replies.