• Hi,

    I added the following to my header.php file:

    <?php query_posts('showposts=1&cat=11'); ?><?php while (have_posts()) : the_post(); ?>
    <?php the_title('<span style="font-weight:bold"><a href="?cat=11" style="color:#666">', '</a></span>'); ?><p style="padding:0px 20px 0px 20px"><?php the_content_rss('', TRUE, '', 30); ?>
    <?php endwhile;?>

    I had hoped it would just display ONE post in that one area(which it does), but then instead of displaying the rest of my page content in the main body, it just shows the same bit of text from my post.

    It seems to set query_posts for the remainder of my page to what I use in that bit of code, so no matter what page it’s on, it’ll look to cat=11 and show the most recent post, instead of the page content for that ID ??

    How do I fix this so it’ll keep the rest of my page content as it should be?

Viewing 2 replies - 16 through 17 (of 17 total)
Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Displaying ONE post on ANY page?’ is closed to new replies.