SHOW:
|
|
- or go back to the newest paste.
1 | <div id="sidebar-interview"> | |
2 | ||
3 | <?php $descendants = get_categories(array('child_of' => 11)); //interview category id is 11 on my install | |
4 | foreach ($descendants as $child) { | |
5 | ||
6 | $catPosts = new WP_Query(); $catPosts->query("showposts=3&cat=$child->term_id"); ?> | |
7 | ||
8 | <h2><?php echo $child->cat_name; ?></h2> | |
9 | <?php while ($catPosts->have_posts()) : $catPosts->the_post(); | |
10 | ||
11 | include 'php/get_category.php'; //creates css classes for categories ?> | |
12 | ||
13 | ||
14 | ||
15 | <div class="post <? echo $cat; ?>"> | |
16 | ||
17 | <span class="meta"> | |
18 | <span class="cat"><? echo $cat_name; ?> <span class="date"><?php the_time(get_option('date_format')); ?> | |
19 | </span> | |
20 | </span> | |
21 | </span> | |
22 | ||
23 | <span class="fill"> | |
24 | <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> | |
25 | <? if ( has_post_thumbnail() ) ?> | |
26 | <a href="<?php the_permalink() ?>"> <? the_post_thumbnail('front-thumbs'); ?> </a> | |
27 | ||
28 | <span class="article-text"> | |
29 | <a href="<?php the_permalink() ?>"> <?php the_excerpt(); ?> </a> | |
30 | </span> | |
31 | </span> | |
32 | ||
33 | </div><!-- end post --> | |
34 | ||
35 | ||
36 | ||
37 | - | <?php endwhile; wp_reset_query(); } //end foreach ?> |
37 | + | <?php endwhile; wp_reset_query(); } //end foreach |
38 | ?> | |
39 | ||
40 | ||
41 | ||
42 | <?php include "php/_sidebar.php"; ?> | |
43 | ||
44 | </div> |