File: /hosting/kak.bg/web/wp-content/themes/kak/includes/post-list.php
<?php
/**
* The template for displaying the single column featured categories.
* Gets the category for the posts from the theme options.
* If no category is selected, displays the latest posts.
*
* @package WordPress
* @file feat-post.php
* @author DesignPicnicStudio
* @link http://designpicnic.com
*/
?>
<div id="feat-postlist" class="cat-posts-list section">
<?php
$categories = get_categories(array('parent' => 0 ));
$i = 0;
?>
<div class="archive-postlist">
<?php foreach ($categories as $category) {
$args = array(
'cat' => $category->cat_ID,
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'posts_per_page' => 1
);
?>
<?php $wp_query = new WP_Query($args); ?>
<?php if ($wp_query->have_posts()) : ?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php
$post_class = "";
if ($i % 2 == 1) {
$post_class = " col-last";
}
?>
<?php if ($i == 4): ?>
</div>
<?php if (!dynamic_sidebar( 'homepage' )) {} ?>
<div class="archive-postlist">
<?php endif; ?>
<div class="category_<?php echo $category->cat_ID; ?> one-half<?php echo $post_class; ?>">
<?php include(locate_template('content-excerpt.php')); ?>
</div>
<?php endwhile; ?>
<?php $i++; ?>
<?php endif; ?>
<?php } ?>
<?php //fp_pagination(); ?>
</div>
<?php //wp_reset_query(); ?>
</div>