HEX
Server: Apache/2.4.49 (FreeBSD) OpenSSL/1.0.2s-freebsd PHP/5.6.36
System: FreeBSD hosting.icon.bg 11.3-RELEASE-p13 FreeBSD 11.3-RELEASE-p13 #0: Tue Sep 1 06:56:51 UTC 2020 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
User: ftpuser (1002)
PHP: 5.6.36
Disabled: NONE
Upload Files
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>