Support » Installing WordPress » query_posts in header !!PROBLEM!!

  • I have a bit of a problem… I am trying to place a recent posts list in my header. When I do the index page looks great. The archive posts as well as all the pages are all wrong. The posts from the <?php query_posts(‘showposts=6’);?> put posts into the pages…

    have a look
    it goes on…

    this is the code I am using, I am wonder if there is anything that might prevent this from happening other than a redesign…

    <?php query_posts(‘showposts=6’);?>
    <?php if (have_posts()) : while (have_posts()) : the_post();?>

  • <link to =”<?php the_permalink() ?>”><span class=”date”><?php the_time(‘m.j’) ?></span> <?php the_title() ?>
  • <?php endwhile; endif; ?>

    the about section is also doing the same thing…
    the code looks like…

    <?php query_posts(‘pagename=about’); >
    <?php if (have_posts()) : >
    <?php while (have_posts()) : the_post(); ?>
    <?php the_content(); >
    <;?php endwhile; >
    <?php endif; >

    please help if you can, I dont know how to remedy this…


  • The topic ‘query_posts in header !!PROBLEM!!’ is closed to new replies.