WordPress.org

Ready to get started?Download WordPress

Forums

query_posts in header !!PROBLEM!! (1 post)

  1. PeacefulKarl
    Member
    Posted 7 years ago #

    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();?>

  2. <link to ="<?php the_permalink() ?>"><span class="date"><?php the_time('m.j') ?></span> <?php the_title() ?>
  3. <?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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags