• This is my WordPress loop:

    <?php get_header(); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <?php if (in_category('7') && is_home() ) continue; ?>
    <?php the_content(__('(more...)')); ?>
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <?php $my_query = new WP_Query('category_name=pensees&showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?>
    <?php the_content(__('(more...)')); ?>
    <?php endwhile; ?>
    
    <?php get_footer(); ?>

    It’s actually split between index.php and sidebar.php.

    I need to add asides posts in my loop from 4 different categories that will be show different content and will be themed differently. I would like them to be shown in the first part of the loop as I post them.

    I just don’t know what code to use.

    Many thanks for your time and help.

  • The topic ‘Need help with unusual loop and aside posts.’ is closed to new replies.