Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter phyllis

    (@phyllis)

    I solved this myself by using a method suggested by the asides. href=”http://codex.wordpress.org/Adding_Asides#Displaying_Asides_on_the_Sidebar”>

    My final snippet looked like the following:

    <!– Begin Urgent Announcements Loop –>

    <?php
    if ($posts) : foreach ($posts as $post) : start_wp();
    ?>
    <?php if (in_category(14)) { ?>
    <div class=\\"asides_sidebar\\">
     <?php echo $post->post_excerpt ?> <?php the_content(); ?>
     <small><?php comments_popup_link(__('#'), __('(1)'), __('(%)')); ?>
       <?php edit_post_link('Edit', ' — '); ?></small>
    </div>
    <?php } ?>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    
    <?php endif; ?>
    
    <!-- End Urgent Announcements Loop -->
    
    <!-- Begin Main Content, Excluding Urgent Announcements Category -->
    
    <?php rewind_posts(); ?>
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <!-- If the post is in the category we want to exclude, we simply pass to the next post. -->
    
    <!-- insert data here -->
    
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class=\\"center\\">Not Found</h2>
    <p class=\\"center\\">Sorry, but you are looking for something that isn't here.</p>
    <?php endif; ?>
    
    <!-- End Main Content -->

    For brevity’s sake, I did not post all of the things that should come within the loop. I did, however, place a comment where those things should be placed.

Viewing 1 replies (of 1 total)