Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cat = get_query_var('cat');
- if(!get_category($cat)->category_parent) : //check if this is top-category
- $categories=get_categories('child_of='.$cat);
- if ($categories) {
- foreach($categories as $term) {
- echo '<h1><a href="' . get_category_link( $term->term_id ) . '" title="' . sprintf( __( "View %s" ), $term->title ) . '" ' . '>' . $term->name.'</a></h1>';
- echo '' . $term->description.'<br><br>';
- }
- }
- ?>
- <?php $args = array(
- 'category__in' => $this_cat,
- 'paged' => get_query_var('paged')
- ); //prepare to show only direct post of this category
- query_posts( $args ); ?>
- <? endif; // end of check ?>
- <ol>
- <?php while (have_posts()) : the_post(); ?>
- <li><h3><a href="<?php the_permalink(); ?>">
- <?php the_title(); ?></a></h3>
- <div style="float:left; margin-bottom:10px; padding-right:5px;" id="thumb">
- <?php the_post_thumbnail('thumbnail'); ?>
- </div>
- <div id="postdescrip" style="margin-bottom:50px; ">
- <?php the_excerpt(); ?>
- </div>
- </li>
- <?php endwhile; ?>
- </ol>
- <div class="navigation">
- <div class="alignleft"><?php previous_posts_link('« Previous') ?></div>
- <div class="alignright"><?php next_posts_link('More »') ?></div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement