Forums

[resolved] Multiple query in header not display loop in post pages (3 posts)

  1. applina
    Member
    Posted 2 weeks ago #

    Hi guys!
    Well i have a problem designing my first wp theme...
    The problem is that if i put a line like this in the header

    <?php query_posts("category_name=category-name"); ?>
    	    <?php while (have_posts()) : the_post(); ?>
    	    	<li><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_title();?></a></li>
    		<?php endwhile; ?>

    the loop in the single.php or page.php or archive.php... in all of the page excluding the home (where i have only query_posts tags)... the loop don't work...
    Sorry but i'm a beginner and i don't know which way to turn...

  2. MichaelH
    moderator
    Posted 2 weeks ago #

    Try adding wp_reset_query(); after your endwhile.

  3. applina
    Member
    Posted 2 weeks ago #

    ooooo you're my savior.
    now works fine!
    thanks a lot!
    agne

Reply

You must log in to post.

About this Topic