• Hi

    I’m using the following code in my sidebar:

    <ul>
    <?php query_posts('category_name=obituaries&showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
            <li><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a>  </li>
            <?php endwhile; ?>
    
    </ul>

    in order to show a list from the specifed category.

    However I’m also trying to display a breadcrumb trail on my index.php, using

    <?php
      $curr_cat = single_cat_title('', false); echo $curr_cat;?>

    But this will only display the category stated in the sidebar. If I change the cat in the sidebar, the breadcrumb changes.

    it’s as if the loop in the sidebar isn’t closing, and I cannot work out how to stop this from happening. Any help on this gratefully received!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Can't close Loop’ is closed to new replies.