| 1 | <?php get_header(); ?>
|
|---|
| 2 |
|
|---|
| 3 | <!-- BEGIN content -->
|
|---|
| 4 | <div id="content">
|
|---|
| 5 |
|
|---|
| 6 | <?php
|
|---|
| 7 | $categories = get_categories('hide_empty=1');
|
|---|
| 8 | foreach ($categories as $category) :
|
|---|
| 9 | query_posts('showposts=1&cat='.$category->cat_ID);
|
|---|
| 10 | if (have_posts()) : the_post();
|
|---|
| 11 | ?>
|
|---|
| 12 |
|
|---|
| 13 | <!-- begin post -->
|
|---|
| 14 | <div class="post">
|
|---|
| 15 | <h2><a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->name ?></a></h2>
|
|---|
| 16 | <div class="thumb"><a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a></div>
|
|---|
| 17 | <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
|---|
| 18 | <p><?php echo dp_clean($post->post_content, 300); ?></p>
|
|---|
| 19 | <a href="<?php the_permalink(); ?>" class="readmore">Read More</a>
|
|---|
| 20 | </div>
|
|---|
| 21 | <!-- end post -->
|
|---|
| 22 |
|
|---|
| 23 | <?php endif; endforeach; ?>
|
|---|
| 24 |
|
|---|
| 25 | </div>
|
|---|
| 26 | <!-- END content -->
|
|---|
| 27 |
|
|---|
| 28 | <?php get_sidebar(); get_footer(); ?>
|
|---|