Title: another query_posts(); problem
Last modified: August 19, 2016

---

# another query_posts(); problem

 *  [towmater](https://wordpress.org/support/users/towmater/)
 * (@towmater)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/another-query_posts-problem/)
 * Been trying to get this work on a site I’m working on, bleachblack[dot]com
 * Referred to this post ([http://wordpress.org/support/topic/57912?replies=9#post-312858](http://wordpress.org/support/topic/57912?replies=9#post-312858))
   and tried to implement the code, but nothing changed. Obviously I’m doing something
   wrong, need some help…
 * Here’s my code –
 *     ```
       <?php get_header(); ?>
   
       	<?php if (have_posts()) : ?>
       	<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
       	<?php query_posts('cat=1&paged=$paged'); ?>
       		<?php while (have_posts()) : the_post(); ?>
   
       		<div class="post">
       			<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
       			<div class="postmetadata"><?php the_time('m.d.Y') ?> | <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
       			<div class="entry">
       				<?php the_content(); ?>
       			</div>
       		</div>
   
       		<?php endwhile; ?>
   
         	<div class="navigation">
       			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
       			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
       			<?php } ?>
       		</div>
   
       	<?php else : ?>
   
       		<h2>Not Found</h2>
       		<p>Sorry, but you are looking for something that isn't here.</p>
   
       	<?php endif; ?>
   
       <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [kristanlh](https://wordpress.org/support/users/kristanlh/)
 * (@kristanlh)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/another-query_posts-problem/#post-896062)
 * Check out this page: [http://wordpress.org/support/topic/57912?replies=9#post-312858](http://wordpress.org/support/topic/57912?replies=9#post-312858)
 * I too am working on a page similar to bleachblack.com, and I have found it very
   helpful so far!

Viewing 1 replies (of 1 total)

The topic ‘another query_posts(); problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [kristanlh](https://wordpress.org/support/users/kristanlh/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/another-query_posts-problem/#post-896062)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
