• Resolved blueyonder

    (@blueyonder)


    I have a horizontal “sidebar” placed under my header and nav bar. In this sidebar I have a box that I want to display posts from the category “Topic of the Week” which is category 3.

    I inserted the code:

    <ul>
        <?php query_posts('cat=3'); ?>
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br />
        <?php the_excerpt(); ?></li>
        <?php endwhile; ?><?php endif; ?>
    </ul>

    It works great and shows the post from that category and the excerpt. Unfortunately, it also forces all of the pages on the site to just show that category. Nothing else will show since I guess it is overriding the normal call for posts and pages.

    Any suggestions to fix this?

    Thanks everyone!!!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Only one category showing on every page’ is closed to new replies.