• Resolved zandfabriek

    (@zandfabriek)


    Hi,

    I’m using a small loop to output posts from a specific category:

    <?php query_posts('cat=16'); ?>
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
            <div class="entry">
              <?php the_content(); ?>
            </div>
    
            <?php endwhile; else: ?>
    
            <p>Sorry, no posts matched your criteria.</p>
    
            <?php endif; ?>

    However, the breadcrumtrail outputs the category-name instead of the page-titel.
    In a post on you’re site i read that:

    This will occur if you have a secondary loop that changes the state of the
    $post variable. You either need to use a different variable in the secondary
    loop (preferred), or you need to restore the $post variable after you are
    done with the secondary loop.

    Could someone explain how to change the loop so it runs correctly?

    Thanx

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

The topic ‘Breadcrumb shows wrong breadcrumbtrail’ is closed to new replies.