<?php
/**
* @package Coraline
* @since Coraline 1.0
*/
get_header(); ?>
<div id="content-container">
<div id="content" role="main">
<h1 class="page-title"><?php
printf( __( 'Category Archives: %s', 'coraline' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
<?php
//start adaptation//
//show a list of direct child (sub) categories if available//
if( $list = wp_list_categories('echo=0&title_li=&show_option_none=&depth=1&child_of='.get_query_var('cat')) ) {
echo '<h3 class="sub-categories-title">Sub Categories List</h3>';
echo '<ul class="sub-categories">' . $list . '</ul>';
}
//tweak the query to show only posts direct in the current category//
global $wp_query;
$args = array_merge( $wp_query->query_vars, array( 'category__in' => array(get_query_var('cat')) ) );
query_posts( $args );
//end of adaptation// ?>
<?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo '<div class="archive-meta">' . $category_description . '</div>';
get_template_part( 'loop', 'category' );
?>
</div><!-- #content -->
</div><!-- #content-container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>