• This is my current loop. I might have left out a bit when copy and pasting. Anyways, it works 100% great and fine when I don’t have that block of query_posts there. However, when I add it, it excludes the posts from that category fine, but when I click next page, it doesn’t work- It still shows the homepage posts, but the link url saids it’s on page 2. I tried using in_category, but it only ignores the posts, thus it doesn’t not keep the 7 post count properly.

    <?php
    
       if (is_home()) {
          query_posts('cat=-7');
       }
    
    ?>
    
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
      <div class="entry <?php if(is_home() && $post==$posts[0] && !is_paged()) echo ' firstpost';?>">
        <h3 class="entrytitle" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark">
          <?php the_title(); ?>
          </a> </h3>
    	  <div class="entrymeta">
            	<?php the_time('F dS, Y');
    			echo " | Category: ";the_category(',');?>
    		</div>
        <div class="entrybody">
          <?php the_content(__('Read more'));?>
    
    <?php			comments_popup_link( 'No comments ','1 comment ','% comments ',	'comments-link ','Comments are off for this post ');
    			edit_post_link(__('<strong>Edit</strong>'));?>
    
        </div>
        <!--
    	<?php trackback_rdf(); ?>
    	-->
      </div>
      <?php comments_template(); // Get wp-comments.php template ?>
    
      <?php endwhile; else: ?>
      <p>
        <?php _e('Sorry, no posts matched your criteria.'); ?>
      </p>
      <?php endif; ?>
Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi

    Change your query posts to this

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("cat=-7&paged=$paged"); ?>

    Thread Starter dmak

    (@dmak)

    Thank you! that worked graet!

    Thread Starter dmak

    (@dmak)

    New problem, now I can’t view the post entry individually.

    Thread Starter dmak

    (@dmak)

    Is there any possible problems that I might have missed? Is there ANY other way to exclude a category without running into any other potential problems?

    what happens when you try to view the post individually?

    are you able to post a URL and an example page?

    Thread Starter dmak

    (@dmak)

    It just doesn’t load and shows the home page.

    when you point at the link that should open up the single page, is the URL that appears in the browser’s status bar at the left the correct URL for the single post? If not, can you figure out why?

    Thread Starter dmak

    (@dmak)

    It’s the correct url and everything, it just doesn’t show it.

    I’m sorry, I have no answer for that off the top of my head. You might want to repost as a new post just that one question. Maybe someone else will have some ideas.

    Thread Starter dmak

    (@dmak)

    It’s almost like the paged problem. It’s just for the single post page.

    Its not a page next, its calling up a static URL, the permalink to the post you are displaying. So I don’t know why that wouldn’t be working.

    Thread Starter dmak

    (@dmak)

    stvwlf, do you have AIM or some form of communication where I can speak with you privately? I prefer if I kept my site private and I will implement the changes really quick for you to see, so that it won’t affect my viewers.

    Thread Starter dmak

    (@dmak)

    I FIGURED IT OUT ! MY theme didn’t have a Single.php, that’s why it didn’t work!

    Well, that could make it a bit difficult!

    Typically when single.php is missing WP will use index.php to display single posts.

    anyway, congrats

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘query_posts causes pages to screw up’ is closed to new replies.