File: D:/HostingSpaces/budilia/budilia.nl/wwwroot/wp-content/themes/zeeStylePro/template-frontpage.php
<?php
/*
Template Name: Frontpage Template
*/
?>
<?php get_header(); ?>
<?php
$options = get_option('themezee_options');
if(isset($options['themeZee_frontpage_slider_active']) and $options['themeZee_frontpage_slider_active'] == 'true') :
$slider_limit = intval($options['themeZee_frontpage_slider_limit']);
$slider_content = ($options['themeZee_frontpage_slider_content'] == 'recent') ? 'date' : 'comment_count';
$slider_category = $options['themeZee_frontpage_slider_category'];
$query_arguments = array(
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'posts_per_page' => $slider_limit,
'orderby' => $slider_content,
'order' => 'DESC',
'category_name' => $slider_category
);
$zee_slider_query = new WP_Query($query_arguments);
?>
<div id="frontpage_slider">
<h2 class="arh"><?php echo esc_attr($options['themeZee_frontpage_slider_title']); ?></h2>
<div id="frontpage_slideshow">
<?php if ($zee_slider_query->have_posts()) : while ($zee_slider_query->have_posts()) : $zee_slider_query->the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('type-frontpage_slider'); ?>>
<div class="entry">
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
</div>
<div class="pic">
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_slider'); ?></a>
</div>
<div class="clear"></div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<ul id="frontpage_pagination">
<?php if ($zee_slider_query->have_posts()) : while ($zee_slider_query->have_posts()) : $zee_slider_query->the_post(); ?>
<li class="slide_page">
<?php the_post_thumbnail('frontpage_slider_thumb'); ?>
<h3><?php the_title(); ?></h3>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>
<div class="clear"></div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?php if(isset($options['themeZee_frontpage_intro']) and $options['themeZee_frontpage_intro'] != '' ) : ?>
<div id="frontpage_intro">
<?php echo $options['themeZee_frontpage_intro']; ?>
</div>
<?php endif; ?>
<?php if(is_active_sidebar('sidebar-frontpage')) : ?>
<div id="frontpage_widgets">
<ul>
<?php dynamic_sidebar('sidebar-frontpage'); ?>
</ul>
<div class="clear"></div>
</div>
<?php endif; ?>
<div class="frontpage_category">
<?php // Check if to display Category One
if(isset($options['themeZee_frontpage_category_one']) and $options['themeZee_frontpage_category_one'] != '') : ?>
<div class="three_col_cat">
<h2 class="arh"><?php echo get_category_by_slug(esc_attr($options['themeZee_frontpage_category_one']))->cat_name; ?></h2>
<?php
$query_arguments = array(
'post_type' => 'post',
'post_status' => 'publish',
'showposts' => 3,
'caller_get_posts' => 1,
'orderby' => 'date',
'category_name' => esc_attr($options['themeZee_frontpage_category_one'])
);
$zee_cat_one_query = new WP_Query($query_arguments);
$i = 0;
if ($zee_cat_one_query->have_posts()) : while ($zee_cat_one_query->have_posts()) : $zee_cat_one_query->the_post(); $i++; ?>
<?php if(isset($i) and $i == 1) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('first_post'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_big'); ?></a>
<h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmeta">
<span class="meta-date"><a href="<?php the_permalink() ?>"><?php the_time(get_option('date_format')); ?></a></span>
<span class="meta-comments"><?php comments_popup_link(__('No comments', 'themezee_lang'),__('One comment','themezee_lang'),__('% comments','themezee_lang')); ?></span>
<div class="clear"></div>
</div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php else: ?>
<div <?php post_class('further_posts'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_small'); ?></a>
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<?php // Check if to display Category Two
if(isset($options['themeZee_frontpage_category_two']) and $options['themeZee_frontpage_category_two'] != '') : ?>
<div class="three_col_cat">
<h2 class="arh"><?php echo get_category_by_slug(esc_attr($options['themeZee_frontpage_category_two']))->cat_name; ?></h2>
<?php
$query_arguments = array(
'post_type' => 'post',
'post_status' => 'publish',
'showposts' => 3,
'caller_get_posts' => 1,
'orderby' => 'date',
'category_name' => esc_attr($options['themeZee_frontpage_category_two'])
);
$zee_cat_two_query = new WP_Query($query_arguments);
$i = 0;
if ($zee_cat_two_query->have_posts()) : while ($zee_cat_two_query->have_posts()) : $zee_cat_two_query->the_post(); $i++; ?>
<?php if(isset($i) and $i == 1) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('first_post'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_big'); ?></a>
<h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmeta">
<span class="meta-date"><a href="<?php the_permalink() ?>"><?php the_time(get_option('date_format')); ?></a></span>
<span class="meta-comments"><?php comments_popup_link(__('No comments', 'themezee_lang'),__('One comment','themezee_lang'),__('% comments','themezee_lang')); ?></span>
<div class="clear"></div>
</div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php else: ?>
<div <?php post_class('further_posts'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_small'); ?></a>
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<?php // Check if to display Category Three
if(isset($options['themeZee_frontpage_category_three']) and $options['themeZee_frontpage_category_three'] != '') : ?>
<div class="three_col_cat">
<h2 class="arh"><?php echo get_category_by_slug(esc_attr($options['themeZee_frontpage_category_three']))->cat_name; ?></h2>
<?php
$query_arguments = array(
'post_type' => 'post',
'post_status' => 'publish',
'showposts' => 3,
'caller_get_posts' => 1,
'orderby' => 'date',
'category_name' => esc_attr($options['themeZee_frontpage_category_three'])
);
$zee_cat_three_query = new WP_Query($query_arguments);
$i = 0;
if ($zee_cat_three_query->have_posts()) : while ($zee_cat_three_query->have_posts()) : $zee_cat_three_query->the_post(); $i++; ?>
<?php if(isset($i) and $i == 1) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('first_post'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_big'); ?></a>
<h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmeta">
<span class="meta-date"><a href="<?php the_permalink() ?>"><?php the_time(get_option('date_format')); ?></a></span>
<span class="meta-comments"><?php comments_popup_link(__('No comments', 'themezee_lang'),__('One comment','themezee_lang'),__('% comments','themezee_lang')); ?></span>
<div class="clear"></div>
</div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php else: ?>
<div <?php post_class('further_posts'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_small'); ?></a>
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
<div class="frontpage_category">
<?php // Check if to display Category Four
if(isset($options['themeZee_frontpage_category_four']) and $options['themeZee_frontpage_category_four'] != '') : ?>
<div class="two_col_cat">
<h2 class="arh"><?php echo get_category_by_slug(esc_attr($options['themeZee_frontpage_category_four']))->cat_name; ?></h2>
<?php
$query_arguments = array(
'post_type' => 'post',
'post_status' => 'publish',
'showposts' => 3,
'caller_get_posts' => 1,
'orderby' => 'date',
'category_name' => esc_attr($options['themeZee_frontpage_category_four'])
);
$zee_cat_four_query = new WP_Query($query_arguments);
$i = 0;
if ($zee_cat_four_query->have_posts()) : while ($zee_cat_four_query->have_posts()) : $zee_cat_four_query->the_post(); $i++; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('further_posts'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_small'); ?></a>
<h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<?php // Check if to display Category Five
if(isset($options['themeZee_frontpage_category_five']) and $options['themeZee_frontpage_category_five'] != '') : ?>
<div class="two_col_cat">
<h2 class="arh"><?php echo get_category_by_slug(esc_attr($options['themeZee_frontpage_category_five']))->cat_name; ?></h2>
<?php
$query_arguments = array(
'post_type' => 'post',
'post_status' => 'publish',
'showposts' => 3,
'caller_get_posts' => 1,
'orderby' => 'date',
'category_name' => esc_attr($options['themeZee_frontpage_category_five'])
);
$zee_cat_five_query = new WP_Query($query_arguments);
$i = 0;
if ($zee_cat_five_query->have_posts()) : while ($zee_cat_five_query->have_posts()) : $zee_cat_five_query->the_post(); $i++; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('further_posts'); ?>>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('frontpage_thumb_small'); ?></a>
<h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
<?php get_footer(); ?>