<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (in_category('excerpts') && is_home() ) continue; ?>
<div id="post-<?php the_ID(); ?>" class="post">
<h3 class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="meta">
<p><span class="date-post icon"><?php the_time('F j Y') ?></span><span class="comment-post icon"><?php comments_number('No Comments','one Commented','% Commented'); ?></span></p>
<p><span class="categories-post icon">Categorized Under: <?php the_category(', ') ?></span></p><div class="clearleft"></div>
</div>
<div class="entry">
<?php the_content(); ?>
</div>
</div>
<?php endwhile; ?>
<?php $my_query = new WP_Query('category_name=excerpts&showposts=10');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
Finally, I gave up because its been awhile since I last worked on WordPress themes, I consulted one of my developer colleague who used to work with it. His diagnosis was the logic was right and that I should check the settings first of which I already did. It turned out that only 3 posts were set to display, what I didn't know was that WordPress also counts the articles under the Excerpts Category, although the code above skips the articles from displaying (under the Excerpts Category), again it does not display the articles under excerpts but counts the articles.
The solution was add more blog articles to display, and alternate the articles under the Excerpts with the other cateogries.
No comments:
Post a Comment