SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | /** | |
3 | * @package Coraline | |
4 | * @since Coraline 1.0 | |
5 | */ | |
6 | ||
7 | get_header(); ?> | |
8 | ||
9 | <div id="content-container"> | |
10 | <div id="content" role="main"> | |
11 | ||
12 | - | <h1 class="page-title"><?php |
12 | + | <h1 class="page-title"><?php |
13 | printf( __( 'Category Archives: %s', 'coraline' ), '<span>' . single_cat_title( '', false ) . '</span>' ); | |
14 | ?></h1> | |
15 | ||
16 | <?php | |
17 | //start adaptation// | |
18 | ||
19 | //show a list of direct child (sub) categories if available// | |
20 | if( $list = wp_list_categories('echo=0&title_li=&show_option_none=&depth=1&child_of='.get_query_var('cat')) ) { | |
21 | echo '<h3 class="sub-categories-title">Sub Categories List</h3>'; | |
22 | echo '<ul class="sub-categories">' . $list . '</ul>'; | |
23 | } | |
24 | ||
25 | //tweak the query to show only posts direct in the current category// | |
26 | global $wp_query; | |
27 | $args = array_merge( $wp_query->query_vars, array( 'category__in' => array(get_query_var('cat')) ) ); | |
28 | query_posts( $args ); | |
29 | ||
30 | //end of adaptation// ?> | |
31 | ||
32 | <?php | |
33 | $category_description = category_description(); | |
34 | if ( ! empty( $category_description ) ) | |
35 | echo '<div class="archive-meta">' . $category_description . '</div>'; | |
36 | ||
37 | get_template_part( 'loop', 'category' ); | |
38 | ?> | |
39 | ||
40 | </div><!-- #content --> | |
41 | </div><!-- #content-container --> | |
42 | ||
43 | <?php get_sidebar(); ?> | |
44 | <?php get_footer(); ?> |