Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Custom Category Archive
- *
- *
- */
- <?php $categories = get_categories( $args );?>
- <?php foreach ($categories as $category) { $catCounter++; $catLink=get_category_link($category->term_id);
- $catStyle = '';
- if (is_int($catCounter / 2)) $catStyle = ' class="catAlt"';
- echo '<h3 class="archive-category"><a href="'.$catLink.'" title="'.$category->name.'">'.ucwords($category->name).'</a></h3>';
- query_posts('cat='.$category->term_id.'&posts_per_page=-1');?>
- <ul class="archive-post-list">
- <?php while (have_posts()) : the_post(); ?>
- <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
- <?php endwhile; ?>
- </ul>
- <?php } ?>
Add Comment
Please, Sign In to add comment