Category Page, 2 loops for different categories.
-
I was wondering how I would create a second loop for my category page? I’m trying to create a loop for my blog and recipes. Here’s the code from it…
<?php if ( is_category('blog')): ?> <div id="content" class="about"> <div id="left_col"> <img src="<?php bloginfo('template_url');?>/images/logo_sm.png" class="left"><h2 id="ab">WHC Health Tips</h2> <ul id="blog"> <?php if (have_posts()) : while (have_posts()) : the_post();?> <li class="post"> <h3><a class="" href="<?php the_permalink();?>"><?php the_date();?> - <?php the_title();?></a></h3> <?php echo better_excerpt('350', '...');?> » <a href="<?php the_permalink();?>">read more</a> </li> <?php endwhile; ?> <?php endif; ?> </ul> <div class="navigation"><?php posts_nav_link(' - ','« Newer Articles','Older Articles »'); ?></div>
I want it to be able to check if it’s the blog category, or the recipes category. Thanks for the help in advance!
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Category Page, 2 loops for different categories.’ is closed to new replies.