• Resolved hunts57

    (@hunts57)


    I installed wordpress a week ago and then updated to 3.1 yesterday. I’ve now started adding content. However, my categories show all content from other categories.

    Cooking schools (parent)
    abruzzo (child of Cooking schools)
    Emilia-Romagna (child of Cooking schools)

    I have one post in Abruzzo and 2 in Emilia-Romagna however when I click on the categories I see all three! 🙁

    http://www.cookinginitaly.net

    maybe I’ve done something wrong in in archive.php

    <?php query_posts('orderby=rand'); ?>
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<h1 class="single"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>  
    
    	 <div id="archive">
    	<a href="<?php the_permalink() ?>" rel="bookmark" title="Go to <?php the_title(); ?>">
        <?php the_post_thumbnail(); ?></a>
    	<?php the_excerpt(__('Read more'));?></div>
Viewing 1 replies (of 1 total)
  • Thread Starter hunts57

    (@hunts57)

    I found the solution. It was the first line in the query

    <?php query_posts('orderby=rand'); ?>

    I changed it to

    <?php query_posts($query_string . '&orderby=rand'); ?>

    which seems to have resolved the problem.

Viewing 1 replies (of 1 total)
  • The topic ‘categories have posts mixed in from other categories’ is closed to new replies.