WordPress.org

Support

Support » Installation » query_posts in header !!PROBLEM!!

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
    http://olsonimages.com/archives/44
    and
    http://olsonimages.com/contact-me/
    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…

    Thanks
    Karl

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