WordPress.org

Ready to get started?Download WordPress

Forums

Categorizing Asides (1 post)

  1. waltreichen
    Member
    Posted 7 years ago #

    How can I create four different Asides lists on my main page with different categories set for each one? My existing code is:

    <?php
    query_posts('cat=12'.$asides.'&posts_per_page=3');
    $num=0;
    ?>
    <div id="sec2entries">
    <?php if (have_posts()) : ?>

    <h4>EUROPE ARTICLES</h4>

    <?php while (have_posts()) : the_post(); ?>
    <?php if ($num < 1) {$num++;continue;} ?>
    <h4><a>"><?php the_title(); ?></a> <?php edit_post_link("(e)", "", ""); ?></h4>
    <div class="postmeta" style="margin:0px">
    <?php the_time('F j, Y'); ?> | <?php comments_popup_link('0 comments', '1 comment', '% comments' ) ?>
    </div>

    <?php endwhile; ?>
    <?php else : ?>
    <!-- no posts -->
    <div class="nonfeature">
    <h2>Sorry, no posts were found</h2>
    </div><?php endif; ?>

    Where, I think, "12" on the second line would stand for all my European articles. But all I get is "Sorry, no posts were found".

Topic Closed

This topic has been closed to new replies.

About this Topic